(self)
| 1534 | |
| 1535 | @testing.requires.timing_intensive |
| 1536 | def test_recycle_on_invalidate(self): |
| 1537 | p = self._queuepool_fixture(pool_size=1, max_overflow=0) |
| 1538 | c1 = p.connect() |
| 1539 | c_ref = weakref.ref(c1.dbapi_connection) |
| 1540 | c1.close() |
| 1541 | c2 = p.connect() |
| 1542 | is_(c2.dbapi_connection, c_ref()) |
| 1543 | |
| 1544 | c2_rec = c2._connection_record |
| 1545 | p._invalidate(c2) |
| 1546 | assert c2_rec.dbapi_connection is None |
| 1547 | c2.close() |
| 1548 | time.sleep(0.5) |
| 1549 | c3 = p.connect() |
| 1550 | |
| 1551 | is_not(c3.dbapi_connection, c_ref()) |
| 1552 | |
| 1553 | @testing.requires.timing_intensive |
| 1554 | def test_recycle_on_soft_invalidate(self): |
nothing calls this directly
no test coverage detected