Skip to content

Commit 752def6

Browse files
committed
More accurately simulate connection_lost
1 parent 5db8472 commit 752def6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ async def test_pool_does_not_reuse_connection_with_exception(pool_creator, loop)
519519
await cur.execute('SELECT 1;')
520520

521521
connection, = pool._free
522-
connection._reader.set_exception(IOError())
522+
connection._writer._protocol.connection_lost(IOError())
523523

524524
async with pool.get() as conn:
525525
cur = await conn.cursor()

0 commit comments

Comments
 (0)