diff --git a/test/test_cursor.py b/test/test_cursor.py index 212de4d287..7b10c2cac6 100644 --- a/test/test_cursor.py +++ b/test/test_cursor.py @@ -1259,8 +1259,8 @@ def test_timeout_kills_cursor_asynchronously(self): def assertCursorKilled(): wait_until( - lambda: len(client._MongoClient__kill_cursors_queue) == 0, - "waited for all killCursor requests to complete", + lambda: len(listener.succeeded_events), + "find successful killCursors command", ) self.assertEqual(1, len(listener.started_events))