We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1096fe commit 5668138Copy full SHA for 5668138
aiosqlite/tests/smoke.py
@@ -413,6 +413,17 @@ async def test_cursor_on_closed_connection_loop(self):
413
except sqlite3.ProgrammingError:
414
pass
415
416
+ async def test_close_blocking_until_transaction_queue_empty(self):
417
+ db = await aiosqlite.connect(self.db)
418
+ # Insert transactions into the
419
+ # transaction queue '_tx'
420
+ for i in range(1000):
421
+ await db.execute(f"select 1, {i}")
422
+ # Wait for all transactions to complete
423
+ await db.close()
424
+ # Check no more transaction pending
425
+ self.assertEqual(db._tx.empty(), True)
426
+
427
async def test_close_twice(self):
428
db = await aiosqlite.connect(self.db)
429
0 commit comments