Skip to content

Commit f3363b0

Browse files
committed
PYTHON-4871 - Fix async waitForEvent
1 parent 3e5890a commit f3363b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/asynchronous/unified_format.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
)
5151
from test.utils import (
5252
async_get_pool,
53+
async_wait_until,
5354
camel_to_snake,
5455
camel_to_snake_args,
5556
parse_spec_options,
@@ -1144,13 +1145,13 @@ def _testOperation_assertEventCount(self, spec):
11441145
client, event, count = spec["client"], spec["event"], spec["count"]
11451146
self.assertEqual(self._event_count(client, event), count, f"expected {count} not {event!r}")
11461147

1147-
def _testOperation_waitForEvent(self, spec):
1148+
async def _testOperation_waitForEvent(self, spec):
11481149
"""Run the waitForEvent test operation.
11491150
11501151
Wait for a number of events to be published, or fail.
11511152
"""
11521153
client, event, count = spec["client"], spec["event"], spec["count"]
1153-
wait_until(
1154+
await async_wait_until(
11541155
lambda: self._event_count(client, event) >= count,
11551156
f"find {count} {event} event(s)",
11561157
)

0 commit comments

Comments
 (0)