summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-10-07 09:47:46 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-10-07 09:49:40 -0400
commitbb32b59cd4e3477402c44d70ef6b5a12827bb429 (patch)
tree319d43b8698d076f571568abb445a7a728246277 /test
parent0220b58917b5a979891b5765f6ac5095e0368489 (diff)
downloadsqlalchemy-bb32b59cd4e3477402c44d70ef6b5a12827bb429.tar.gz
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
Diffstat (limited to 'test')
-rw-r--r--test/engine/test_reconnect.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/engine/test_reconnect.py b/test/engine/test_reconnect.py
index a6cec2ea2..8881620f7 100644
--- a/test/engine/test_reconnect.py
+++ b/test/engine/test_reconnect.py
@@ -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))