| 623 | @testing.requires.queue_pool |
| 624 | @async_test |
| 625 | async def test_dispose(self, async_engine): |
| 626 | c1 = await async_engine.connect() |
| 627 | c2 = await async_engine.connect() |
| 628 | |
| 629 | await c1.close() |
| 630 | await c2.close() |
| 631 | |
| 632 | p1 = async_engine.pool |
| 633 | |
| 634 | if isinstance(p1, AsyncAdaptedQueuePool): |
| 635 | eq_(async_engine.pool.checkedin(), 2) |
| 636 | |
| 637 | await async_engine.dispose() |
| 638 | if isinstance(p1, AsyncAdaptedQueuePool): |
| 639 | eq_(async_engine.pool.checkedin(), 0) |
| 640 | is_not(p1, async_engine.pool) |
| 641 | |
| 642 | @testing.requires.queue_pool |
| 643 | @async_test |