Commit 6fd5a36a authored by Jeremy Hylton's avatar Jeremy Hylton

Restore the sleep() in checkReconnectSwitch().

If the client isn't connected at all, sync() returns quickly and the
test fails because it doesn't wait long enough for the client.
parent 3ee5045e
...@@ -52,7 +52,6 @@ class DummyDB: ...@@ -52,7 +52,6 @@ class DummyDB:
def invalidate(self, *args, **kwargs): def invalidate(self, *args, **kwargs):
pass pass
class CommonSetupTearDown(StorageTestBase): class CommonSetupTearDown(StorageTestBase):
"""Common boilerplate""" """Common boilerplate"""
...@@ -568,6 +567,10 @@ class ReconnectionTests(CommonSetupTearDown): ...@@ -568,6 +567,10 @@ class ReconnectionTests(CommonSetupTearDown):
self._dostore() self._dostore()
break break
except (Disconnected, ReadOnlyError): except (Disconnected, ReadOnlyError):
# If the client isn't connected at all, sync() returns
# quickly and the test fails because it doesn't wait
# long enough for the client.
time.sleep(0.1)
self._storage.sync() self._storage.sync()
else: else:
self.fail("Couldn't store after starting a read-write server") self.fail("Couldn't store after starting a read-write server")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment