Commit da4d4ce1 authored by Jim Fulton's avatar Jim Fulton

Use a timeout argument in a test to avoid waiting too long when demonstrating...

Use a timeout argument in a test to avoid waiting too long when demonstrating ClientDisconnected errors
parent d50d9823
...@@ -476,10 +476,12 @@ class ClientStorage(object): ...@@ -476,10 +476,12 @@ class ClientStorage(object):
return buf return buf
def history(self, oid, size=1): def history(self, oid, size=1,
timeout=None, # for tests
):
"""Storage API: return a sequence of HistoryEntry objects. """Storage API: return a sequence of HistoryEntry objects.
""" """
return self._call('history', oid, size) return self._call('history', oid, size, timeout=timeout)
def record_iternext(self, next=None): def record_iternext(self, next=None):
"""Storage API: get the next database record. """Storage API: get the next database record.
......
...@@ -782,7 +782,8 @@ class ReconnectionTests(CommonSetupTearDown): ...@@ -782,7 +782,8 @@ class ReconnectionTests(CommonSetupTearDown):
self.pollDown() self.pollDown()
# Accesses should fail now # Accesses should fail now
self.assertRaises(ClientDisconnected, self._storage.history, ZERO) self.assertRaises(ClientDisconnected, self._storage.history, ZERO,
timeout=1)
# Restart the server, this time read-write # Restart the server, this time read-write
self.startServer(create=0, keep=0) self.startServer(create=0, keep=0)
......
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