Add a sleep(1) before each pack() call.
pack() uses a coarse-grain timer to decide which revisions to look at during a pack. The tests depend on a pack() called after a commit to see that committed transaction, but the implementation can't guarantee that it will. In particular, pack() converts its time argument to a TimeStamp by truncating to the nearest second. If a transaction T1 commits and pack is called (with the current time as its argument) during the same second, the pack() will not consider T1. This was causing intermittent, but frequent test failures on Windows. The fix is to add a small delay in the pack test cases to guarantee that pack(time.time()) will always see the last committed transaction.
Showing
Please register or sign in to comment