Skip to content

Commit 6547c3c

Browse files
committed
async spec runner should only call kill_all_sessions after runs
1 parent b898826 commit 6547c3c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/asynchronous/utils_spec_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,11 @@ async def setup_scenario(self, scenario_def):
647647
async def run_scenario(self, scenario_def, test):
648648
self.maybe_skip_scenario(test)
649649

650-
# Kill all sessions before and after each test to prevent an open
650+
# Kill all sessions before (sync only) and after each test to prevent an open
651651
# transaction (from a test failure) from blocking collection/database
652652
# operations during test set up and tear down.
653-
await self.kill_all_sessions()
653+
if _IS_SYNC:
654+
await self.kill_all_sessions()
654655
self.addAsyncCleanup(self.kill_all_sessions)
655656
await self.setup_scenario(scenario_def)
656657
database_name = self.get_scenario_db_name(scenario_def)

test/utils_spec_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,11 @@ def setup_scenario(self, scenario_def):
647647
def run_scenario(self, scenario_def, test):
648648
self.maybe_skip_scenario(test)
649649

650-
# Kill all sessions before and after each test to prevent an open
650+
# Kill all sessions before (sync only) and after each test to prevent an open
651651
# transaction (from a test failure) from blocking collection/database
652652
# operations during test set up and tear down.
653-
self.kill_all_sessions()
653+
if _IS_SYNC:
654+
self.kill_all_sessions()
654655
self.addCleanup(self.kill_all_sessions)
655656
self.setup_scenario(scenario_def)
656657
database_name = self.get_scenario_db_name(scenario_def)

0 commit comments

Comments
 (0)