Commit 64e02391 authored by Julien Muchembled's avatar Julien Muchembled

qa: fix 2 tests with ZODB5

parent 491f4c89
...@@ -1055,6 +1055,10 @@ class Test(NEOThreadedTest): ...@@ -1055,6 +1055,10 @@ class Test(NEOThreadedTest):
# Check that the storage hasn't answered to the store, # Check that the storage hasn't answered to the store,
# which means that a lock is still taken for r['x'] by t2. # which means that a lock is still taken for r['x'] by t2.
self.tic() self.tic()
try:
txn = txn.data(c1)
except (AttributeError, KeyError): # BBB: ZODB < 5
pass
txn_context = cluster.client._txn_container.get(txn) txn_context = cluster.client._txn_container.get(txn)
empty = txn_context.queue.empty() empty = txn_context.queue.empty()
ll() ll()
...@@ -2282,6 +2286,10 @@ class Test(NEOThreadedTest): ...@@ -2282,6 +2286,10 @@ class Test(NEOThreadedTest):
# Check that the storage hasn't answered to the store, # Check that the storage hasn't answered to the store,
# which means that a lock is still taken for r[''] by t1. # which means that a lock is still taken for r[''] by t1.
self.tic() self.tic()
try:
txn = txn.data(c3)
except (AttributeError, KeyError): # BBB: ZODB < 5
pass
txn_context = db.storage.app._txn_container.get(txn) txn_context = db.storage.app._txn_container.get(txn)
raise Abort(txn_context.queue.empty()) raise Abort(txn_context.queue.empty())
TransactionalResource(t3, 1, commit=t3_commit) TransactionalResource(t3, 1, commit=t3_commit)
......
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