##// END OF EJS Templates
test: factor out the "wait" logic in bookrace...
marmoute -
r42707:febf5c82 stable
parent child Browse files
Show More
@@ -120,7 +120,8 b' We build a server side extension for thi'
120 120 > import time
121 121 > import atexit
122 122 > from mercurial import error, extensions, bookmarks
123 > def wrapinit(orig, self, repo):
123 >
124 > def wait():
124 125 > if not os.path.exists('push-A-started'):
125 126 > print('setting raced push up')
126 127 > with open('push-A-started', 'w'):
@@ -131,6 +132,9 b' We build a server side extension for thi'
131 132 > if clock <= 0:
132 133 > raise error.Abort("race scenario timed out")
133 134 > time.sleep(0.1)
135 >
136 > def wrapinit(orig, self, repo):
137 > wait()
134 138 > return orig(self, repo)
135 139 > def uisetup(ui):
136 140 > extensions.wrapfunction(bookmarks.bmstore, '__init__', wrapinit)
General Comments 0
You need to be logged in to leave comments. Login now