Skip to content

Commit 9c7adf8

Browse files
authored
PYTHON-4609 Speed up unified tests (mongodb#1768)
1 parent d28ceb2 commit 9c7adf8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/unified_format.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from test import (
3434
IntegrationTest,
3535
client_context,
36+
client_knobs,
3637
unittest,
3738
)
3839
from test.helpers import (
@@ -1037,8 +1038,18 @@ def setUpClass(cls):
10371038
if "retryable-writes" in cls.TEST_SPEC["description"]:
10381039
raise unittest.SkipTest("MMAPv1 does not support retryWrites=True")
10391040

1041+
# Speed up the tests by decreasing the heartbeat frequency.
1042+
cls.knobs = client_knobs(
1043+
heartbeat_frequency=0.1,
1044+
min_heartbeat_interval=0.1,
1045+
kill_cursor_frequency=0.1,
1046+
events_queue_frequency=0.1,
1047+
)
1048+
cls.knobs.enable()
1049+
10401050
@classmethod
10411051
def tearDownClass(cls):
1052+
cls.knobs.disable()
10421053
for client in cls.mongos_clients:
10431054
client.close()
10441055
super().tearDownClass()

0 commit comments

Comments
 (0)