Skip to content

Commit 772cceb

Browse files
committed
PYTHON-4580 Fix wait() method
1 parent 9c00d54 commit 772cceb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/asynchronous/utils_spec_runner.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ async def assert_index_not_exists(self, database, collection, index):
315315
coll = self.client[database][collection]
316316
self.assertNotIn(index, [doc["name"] async for doc in await coll.list_indexes()])
317317

318-
async def wait(self, spec):
318+
async def wait(self, ms):
319319
"""Run the "wait" test operation."""
320-
await asyncio.sleep(spec["ms"] / 1000.0)
320+
await asyncio.sleep(ms / 1000.0)
321321

322322
def assertErrorLabelsContain(self, exc, expected_labels):
323323
labels = [l for l in expected_labels if exc.has_error_label(l)]

test/utils_spec_runner.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ def assert_index_not_exists(self, database, collection, index):
315315
coll = self.client[database][collection]
316316
self.assertNotIn(index, [doc["name"] for doc in coll.list_indexes()])
317317

318-
def wait(self, spec):
318+
def wait(self, ms):
319319
"""Run the "wait" test operation."""
320-
time.sleep(spec["ms"] / 1000.0)
320+
time.sleep(ms / 1000.0)
321321

322322
def assertErrorLabelsContain(self, exc, expected_labels):
323323
labels = [l for l in expected_labels if exc.has_error_label(l)]

0 commit comments

Comments
 (0)