force a sleep for test_reconnect

as I dont have a windows machine to test I don't really know
how to get a millisecond-accurate timer for windows,
Python documentation claimed time.monotonic() did this however
the continued failure of test_reconnect indicates this is not the case
and that the timer is still bumping up by multi-millisecond
granularity.   force a delay instead.

Change-Id: I237b223eabc55c1d47ecece13873be1f7be20e47
This commit is contained in:
Mike Bayer
2020-10-07 09:47:46 -04:00
parent 0220b58917
commit bb32b59cd4
+3
View File
@@ -405,6 +405,9 @@ class MockReconnectTest(fixtures.TestBase):
self.dbapi.shutdown()
# force windows monotonic timer to definitely increment
time.sleep(0.5)
# close on DBAPI connection occurs here, as it is detected
# as invalid.
assert_raises(tsa.exc.DBAPIError, conn.execute, select(1))