Commit d98b576c authored by Julien Muchembled's avatar Julien Muchembled

qa: deindent code

parent dbf128b7
...@@ -311,29 +311,28 @@ class Test(NEOThreadedTest): ...@@ -311,29 +311,28 @@ class Test(NEOThreadedTest):
delay[c2].clear() delay[c2].clear()
delay[1-c2].set() delay[1-c2].set()
if 1: t, c = cluster.getTransaction()
t, c = cluster.getTransaction() c.root()[0] = ob = PCounterWithResolution()
c.root()[0] = ob = PCounterWithResolution() t.commit()
t.commit() counter_oid = ob._p_oid
counter_oid = ob._p_oid del ob, t, c
del ob, t, c
t1, c1 = cluster.getTransaction()
t2, c2 = cluster.getTransaction()
o1 = c1.root()[0]
o2 = c2.root()[0]
o1.value += 1
o2.value += 2
with Patch(TransactionManager, storeObject=onStoreObject), \ t1, c1 = cluster.getTransaction()
Patch(MTClientConnection, ask=onAsk): t2, c2 = cluster.getTransaction()
t = self.newThread(t1.commit) o1 = c1.root()[0]
t2.commit() o2 = c2.root()[0]
t.join() o1.value += 1
t1.begin() o2.value += 2
t2.begin()
self.assertEqual(o1.value, 3) with Patch(TransactionManager, storeObject=onStoreObject), \
self.assertEqual(o2.value, 3) Patch(MTClientConnection, ask=onAsk):
t = self.newThread(t1.commit)
t2.commit()
t.join()
t1.begin()
t2.begin()
self.assertEqual(o1.value, 3)
self.assertEqual(o2.value, 3)
return except_list return except_list
def testDelayedStore(self): def testDelayedStore(self):
......
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