Skip to content

Commit 83d0e7a

Browse files
authored
PYTHON-4033 Address perf test UserWarning (#1422)
1 parent f230a2e commit 83d0e7a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.evergreen/perf.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ timeout:
2626
2727
functions:
2828
"fetch source":
29-
# Executes git clone and applies the submitted patch, if any
29+
# Executes clone and applies the submitted patch, if any
3030
- command: git.get_project
3131
params:
3232
directory: "src"
@@ -67,7 +67,6 @@ functions:
6767
PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
6868
PREPARE_SHELL: |
6969
set -o errexit
70-
set -o xtrace
7170
export DRIVERS_TOOLS="$DRIVERS_TOOLS"
7271
export MONGO_ORCHESTRATION_HOME="$MONGO_ORCHESTRATION_HOME"
7372
export MONGODB_BINARIES="$MONGODB_BINARIES"

test/performance/perf_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def runTest(self):
122122
self.max_iterations = NUM_ITERATIONS
123123
for i in range(NUM_ITERATIONS):
124124
if time.monotonic() - start > MAX_ITERATION_TIME:
125-
warnings.warn("Test timed out, completed %s iterations." % i)
125+
with warnings.catch_warnings():
126+
warnings.simplefilter("default")
127+
warnings.warn("Test timed out, completed %s iterations." % i)
126128
break
127129
self.before()
128130
with Timer() as timer:

0 commit comments

Comments
 (0)