Commit 327d726f authored by Jim Fulton's avatar Jim Fulton

Cleaned up check_checkCurrentSerialInTransaction

- Use assertEqual rather than assertTrue for better error messages.

- Fixed a typo that caused an assertion to be missed.
parent 807ba63c
...@@ -233,8 +233,8 @@ class BasicStorage: ...@@ -233,8 +233,8 @@ class BasicStorage:
self._storage.checkCurrentSerialInTransaction(oid, tid, t) self._storage.checkCurrentSerialInTransaction(oid, tid, t)
self._storage.tpc_vote(t) self._storage.tpc_vote(t)
except POSException.ReadConflictError as v: except POSException.ReadConflictError as v:
self.assertTrue(v.oid) == oid self.assertEqual(v.oid, oid)
self.assertTrue(v.serials == (tid2, tid)) self.assertEqual(v.serials, (tid2, tid))
else: else:
if 0: self.assertTrue(False, "No conflict error") if 0: self.assertTrue(False, "No conflict error")
......
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