@@ -267,33 +267,39 @@ def test_arraysize_buffer_size_passthrough(
267267 def test_closing_result_set_with_closed_connection_soft_closes_commands (self ):
268268 mock_connection = Mock ()
269269 mock_backend = Mock ()
270+ mock_results = Mock ()
270271 result_set = client .ResultSet (
271272 connection = mock_connection ,
272273 thrift_backend = mock_backend ,
273274 execute_response = Mock (),
274275 )
276+ result_set .results = mock_results
275277 mock_connection .open = False
276278
277279 result_set .close ()
278280
279281 self .assertFalse (mock_backend .close_command .called )
280282 self .assertTrue (result_set .has_been_closed_server_side )
283+ mock_results .close .assert_called_once ()
281284
282285 def test_closing_result_set_hard_closes_commands (self ):
283286 mock_results_response = Mock ()
284287 mock_results_response .has_been_closed_server_side = False
285288 mock_connection = Mock ()
286289 mock_thrift_backend = Mock ()
290+ mock_results = Mock ()
287291 mock_connection .open = True
288292 result_set = client .ResultSet (
289293 mock_connection , mock_results_response , mock_thrift_backend
290294 )
295+ result_set .results = mock_results
291296
292297 result_set .close ()
293298
294299 mock_thrift_backend .close_command .assert_called_once_with (
295300 mock_results_response .command_handle
296301 )
302+ mock_results .close .assert_called_once ()
297303
298304 @patch ("%s.client.ResultSet" % PACKAGE_NAME )
299305 def test_executing_multiple_commands_uses_the_most_recent_command (
0 commit comments