From: Mike Bayer Date: Wed, 7 Oct 2020 13:47:46 +0000 (-0400) Subject: force a sleep for test_reconnect X-Git-Tag: rel_1_4_0b1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb32b59cd4e3477402c44d70ef6b5a12827bb429;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 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 --- diff --git a/test/engine/test_reconnect.py b/test/engine/test_reconnect.py index a6cec2ea2f..8881620f78 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))