mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 02:43:43 +03:00
Increase timeout on concurrent_execution test
With test_concurrent_execution test, checking two threads issuing a pg_sleep of 2 seconds and and check if they complete in under 3 seconds occasionally fails when the test is run in a virtual machine on a VM Server with other virtual machines running. Increased the sleep to 4, and the check to 7, giving 3 seconds buffer instead of 1 second.
This commit is contained in:
parent
7dfb40ce43
commit
7c9d8192a3
|
@ -119,7 +119,7 @@ class ConnectionTests(unittest.TestCase):
|
|||
def slave():
|
||||
cnn = psycopg2.connect(dsn)
|
||||
cur = cnn.cursor()
|
||||
cur.execute("select pg_sleep(2)")
|
||||
cur.execute("select pg_sleep(3)")
|
||||
cur.close()
|
||||
cnn.close()
|
||||
|
||||
|
@ -130,7 +130,7 @@ class ConnectionTests(unittest.TestCase):
|
|||
t2.start()
|
||||
t1.join()
|
||||
t2.join()
|
||||
self.assert_(time.time() - t0 < 3,
|
||||
self.assert_(time.time() - t0 < 5,
|
||||
"something broken in concurrency")
|
||||
|
||||
def test_encoding_name(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user