()
| 21 | @pytest.mark.slow |
| 22 | def test_concurrent_execution(conn_cls, dsn): |
| 23 | def worker(): |
| 24 | cnn = conn_cls.connect(dsn) |
| 25 | cur = cnn.cursor() |
| 26 | cur.execute("select pg_sleep(0.5)") |
| 27 | cur.close() |
| 28 | cnn.close() |
| 29 | |
| 30 | t1 = threading.Thread(target=worker) |
| 31 | t2 = threading.Thread(target=worker) |