diff --git a/test/asynchronous/test_change_stream.py b/test/asynchronous/test_change_stream.py index 187fbf6374..1b89c43bb7 100644 --- a/test/asynchronous/test_change_stream.py +++ b/test/asynchronous/test_change_stream.py @@ -164,6 +164,7 @@ async def test_try_next(self): async with await self.change_stream(max_await_time_ms=250) as stream: self.assertIsNone(await stream.try_next()) # No changes initially. await coll.insert_one({}) # Generate a change. + # On sharded clusters, even majority-committed changes only show # up once an event that sorts after it shows up on the other # shard. So, we wait on try_next to eventually return changes.