@@ -87,8 +87,9 @@ async def test_auth_bad_user(self):
8787 loop = self .loop )
8888
8989 async def test_auth_trust (self ):
90- await self .cluster .connect (
90+ conn = await self .cluster .connect (
9191 user = 'trust_user' , database = 'postgres' , loop = self .loop )
92+ await conn .close ()
9293
9394 async def test_auth_reject (self ):
9495 with self .assertRaisesRegex (
@@ -98,9 +99,10 @@ async def test_auth_reject(self):
9899 user = 'reject_user' , database = 'postgres' , loop = self .loop )
99100
100101 async def test_auth_password_cleartext (self ):
101- await self .cluster .connect (
102+ conn = await self .cluster .connect (
102103 user = 'password_user' , database = 'postgres' ,
103104 password = 'correctpassword' , loop = self .loop )
105+ await conn .close ()
104106
105107 with self .assertRaisesRegex (
106108 asyncpg .InvalidPasswordError ,
@@ -110,9 +112,10 @@ async def test_auth_password_cleartext(self):
110112 password = 'wrongpassword' , loop = self .loop )
111113
112114 async def test_auth_password_md5 (self ):
113- await self .cluster .connect (
115+ conn = await self .cluster .connect (
114116 user = 'md5_user' , database = 'postgres' , password = 'correctpassword' ,
115117 loop = self .loop )
118+ await conn .close ()
116119
117120 with self .assertRaisesRegex (
118121 asyncpg .InvalidPasswordError ,
0 commit comments