Commit 87ac03a7 authored by Joshua Woelfel's avatar Joshua Woelfel

Made zconn_at_test compatible with ZODB3

parent 82c3dfdd
...@@ -109,10 +109,18 @@ class Zconn_atTest(unittest.TestCase): ...@@ -109,10 +109,18 @@ class Zconn_atTest(unittest.TestCase):
transaction.begin() transaction.begin()
connection = self.db.open() connection = self.db.open()
T1_is_connected.send(CONNECTED) T1_is_connected.send(CONNECTED)
tids[THREAD1] = u64(zconn_at(connection)) try:
T2_is_connected.recv() tids[THREAD1] = u64(zconn_at(connection))
transaction.abort() T2_is_connected.recv()
connection.close() transaction.abort()
connection.close()
except AssertionError as error:
T2_is_connected.recv()
transaction.abort()
connection.close()
raise error
#transaction.abort()
#connection.close()
def T2(ctx, self): def T2(ctx, self):
T1_is_connected.recv() T1_is_connected.recv()
...@@ -141,14 +149,21 @@ class Zconn_atTest(unittest.TestCase): ...@@ -141,14 +149,21 @@ class Zconn_atTest(unittest.TestCase):
def T1(ctx, self): def T1(ctx, self):
transaction.begin() transaction.begin()
connection = self.db.open() connection = self.db.open()
tids[START] = u64(zconn_at(connection)) try:
T1_is_connected.send(CONNECTED) tids[START] = u64(zconn_at(connection))
T1_is_connected.send(CONNECTED)
T2_is_done.recv() T2_is_done.recv()
tids[END] = u64(zconn_at(connection)) tids[END] = u64(zconn_at(connection))
transaction.abort() transaction.abort()
connection.close() connection.close()
except AssertionError as error:
T1_is_connected.send(CONNECTED)
T2_is_done.recv()
transaction.abort()
connection.close()
raise error
def T2(ctx, self): def T2(ctx, self):
T1_is_connected.recv() T1_is_connected.recv()
......
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