Skip to content

Commit 3c5e71a

Browse files
authored
PYTHON-4862 Fix handling of interrupt_loop in unified test runner (mongodb#1924)
1 parent 33163ec commit 3c5e71a

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

test/asynchronous/unified_format.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
unittest,
3737
)
3838
from test.unified_format_shared import (
39-
IS_INTERRUPTED,
4039
KMS_TLS_OPTS,
4140
PLACEHOLDER_MAP,
4241
SKIP_CSOT_TESTS,
@@ -104,6 +103,13 @@
104103

105104
_IS_SYNC = False
106105

106+
IS_INTERRUPTED = False
107+
108+
109+
def interrupt_loop():
110+
global IS_INTERRUPTED
111+
IS_INTERRUPTED = True
112+
107113

108114
async def is_run_on_requirement_satisfied(requirement):
109115
topology_satisfied = True

test/unified_format.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
unittest,
3737
)
3838
from test.unified_format_shared import (
39-
IS_INTERRUPTED,
4039
KMS_TLS_OPTS,
4140
PLACEHOLDER_MAP,
4241
SKIP_CSOT_TESTS,
@@ -104,6 +103,13 @@
104103

105104
_IS_SYNC = True
106105

106+
IS_INTERRUPTED = False
107+
108+
109+
def interrupt_loop():
110+
global IS_INTERRUPTED
111+
IS_INTERRUPTED = True
112+
107113

108114
def is_run_on_requirement_satisfied(requirement):
109115
topology_satisfied = True

test/unified_format_shared.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@
139139
}
140140

141141

142-
def interrupt_loop():
143-
global IS_INTERRUPTED
144-
IS_INTERRUPTED = True
145-
146-
147142
def with_metaclass(meta, *bases):
148143
"""Create a base class with a metaclass.
149144

0 commit comments

Comments
 (0)