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