Commit 4aa62185 authored by Julien Muchembled's avatar Julien Muchembled

Relax assertion in check_tid_ordering_w_commit test

It is pointless for lastTransaction() to block until it is allowed to
return the TID of a transaction that has just been committed, because
it may still not be the real last TID (e.g. for some storage
implementations, invalidations are received from a shared server
via the network). While invalidations are still being processed,
it's fine to return immediately with the previous last TID.

This was clarified in commit 4a6b0283
("mvccadapter: check if the last TID changed without invalidation").

See pull request #316
parent 3a493b01
...@@ -347,17 +347,13 @@ class BasicStorage(object): ...@@ -347,17 +347,13 @@ class BasicStorage(object):
attempts_cond.notifyAll() attempts_cond.notifyAll()
@run_in_thread
def lastTransaction():
update_attempts()
results['lastTransaction'] = self._storage.lastTransaction()
@run_in_thread @run_in_thread
def load(): def load():
update_attempts() update_attempts()
results['load'] = utils.load_current(self._storage, ZERO)[1] results['load'] = utils.load_current(self._storage, ZERO)[1]
results['lastTransaction'] = self._storage.lastTransaction()
expected_attempts = 2 expected_attempts = 1
if hasattr(self._storage, 'getTid'): if hasattr(self._storage, 'getTid'):
expected_attempts += 1 expected_attempts += 1
......
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