Fix the test case retry loop
It was failing due to not starting a new transaction.  I tested by
putting some diagnostics in and running it until I observed that the
retry happened sucessfully.
@@ -111,12 +111,17 @@ class TestCaseMeta(type(unittest.TestCase)):
__meth__(self, *args, **kwargs))
except (edgedb.TransactionSerializationError,
edgedb.TransactionDeadlockError):
- if try_no == 3:
+ if (
+ try_no == 3
+ # Only do a retry loop when we have a transaction
+ or not getattr(self, 'ISOLATED_METHODS', False)
+ ):
raise
else:
- self.loop.run_until_complete(self.con.execute(
- 'ROLLBACK;'
- ))
+ self.loop.run_until_complete(self.xact.rollback())
+ self.xact = self.con.transaction()
+ self.loop.run_until_complete(self.xact.start())
+
try_no += 1
else:
break
