# HG changeset patch # User Pierre-Yves David # Date 1560957979 -7200 # Node ID 95c2f951e502d40ebde4395ca1b981d5205327b7 # Parent c4d1807b165f87adc865de8c992ba5e0de0084c1 bookmarks: actually trigger the race deleting bookmark in the test The previous committed version of the test did not triggered the race, but this was hidden by a strange behavior from the test runner. So we are moving the test to a slightly more complex that actually trigger the issue. diff -r c4d1807b165f -r 95c2f951e502 tests/test-bookmarks-corner-case.t --- a/tests/test-bookmarks-corner-case.t Wed Jun 19 17:26:16 2019 +0200 +++ b/tests/test-bookmarks-corner-case.t Wed Jun 19 17:26:19 2019 +0200 @@ -135,11 +135,14 @@ > raise error.Abort("race scenario timed out") > time.sleep(0.1) > - > def wrapinit(orig, self, repo): - > wait(repo) - > return orig(self, repo) - > def uisetup(ui): - > extensions.wrapfunction(bookmarks.bmstore, '__init__', wrapinit) + > def reposetup(ui, repo): + > class racedrepo(repo.__class__): + > @property + > def _bookmarks(self): + > wait(self) + > return super(racedrepo, self)._bookmarks + > repo.__class__ = racedrepo + > > def e(): > with open('push-A-done', 'w'): > pass @@ -216,7 +219,7 @@ | summary: A1 | | o changeset: 3:f26c3b5167d1 - | | bookmark: book-B + | | bookmark: book-B (false !) | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | summary: B1 @@ -239,4 +242,4 @@ $ hg -R bookrace-server book book-A 4:9ce3b28c16de - book-B 3:f26c3b5167d1 + book-B 3:f26c3b5167d1 (false !)