Commit d297bdd9 authored by Tim Peters's avatar Tim Peters

checkPackUndoLog(): Use snooze() twice to separate the pack time from the

transactions on both sides of it.  The coarse granularity of time.time()
on Windows causes this test to fail sporadically otherwise.
parent c8bee907
...@@ -392,9 +392,9 @@ class PackableStorage(PackableStorageBase): ...@@ -392,9 +392,9 @@ class PackableStorage(PackableStorageBase):
# Commit two different revisions # Commit two different revisions
revid1 = self._dostoreNP(oid, data=pickle.dumps(obj)) revid1 = self._dostoreNP(oid, data=pickle.dumps(obj))
obj.value = 2 obj.value = 2
now = packtime = time.time() snooze()
while packtime <= now: packtime = time.time()
packtime = time.time() snooze()
revid2 = self._dostoreNP(oid, revid=revid1, data=pickle.dumps(obj)) revid2 = self._dostoreNP(oid, revid=revid1, data=pickle.dumps(obj))
# Now pack the first transaction # Now pack the first transaction
self.assertEqual(3,len(self._storage.undoLog())) self.assertEqual(3,len(self._storage.undoLog()))
......
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