File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -180,20 +180,24 @@ def notice_callb(con, message):
180
180
" END"
181
181
"$$"
182
182
)
183
- con .add_log_listener (notice_callb )
184
- for cur_id in range (10 ):
185
- await con .execute ("SELECT _test($1)" , cur_id )
186
183
187
- for cur_id in range (10 ):
188
- self .assertEqual (
189
- q1 .get_nowait (),
190
- (con , cur_id , '1_%s' % cur_id ))
191
- self .assertEqual (
192
- q1 .get_nowait (),
193
- (con , cur_id , '2_%s' % cur_id ))
184
+ try :
185
+ con .add_log_listener (notice_callb )
186
+ for cur_id in range (10 ):
187
+ await con .execute ("SELECT _test($1)" , cur_id )
194
188
195
- con .remove_log_listener (notice_callb )
196
- self .assertTrue (q1 .empty ())
189
+ for cur_id in range (10 ):
190
+ self .assertEqual (
191
+ q1 .get_nowait (),
192
+ (con , cur_id , '1_%s' % cur_id ))
193
+ self .assertEqual (
194
+ q1 .get_nowait (),
195
+ (con , cur_id , '2_%s' % cur_id ))
196
+
197
+ con .remove_log_listener (notice_callb )
198
+ self .assertTrue (q1 .empty ())
199
+ finally :
200
+ await con .execute ('DROP FUNCTION _test(i INT)' )
197
201
198
202
@tb .with_connection_options (server_settings = {
199
203
'client_min_messages' : 'notice'
You can’t perform that action at this time.
0 commit comments