Skip to content

Commit 311754d

Browse files
committed
attempt to fix failures pt2
1 parent 7668b20 commit 311754d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/asynchronous/test_cursor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,9 +1462,9 @@ async def test_command_cursor_to_list_csot_applied(self):
14621462
fail_command = {
14631463
"configureFailPoint": "failCommand",
14641464
"mode": {"times": 1},
1465-
"data": {"failCommands": ["aggregate"], "blockTimeMS": 10000},
1465+
"data": {"failCommands": ["getMore"], "blockTimeMS": 10000},
14661466
}
1467-
cursor = await client.db.test.aggregate([{"$changeStream": {}}])
1467+
cursor = await client.db.test.aggregate([], batchSize=5)
14681468
async with self.fail_point(fail_command):
14691469
with self.assertRaises(PyMongoError) as ctx:
14701470
await cursor.to_list()

test/test_cursor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,9 +1453,9 @@ def test_command_cursor_to_list_csot_applied(self):
14531453
fail_command = {
14541454
"configureFailPoint": "failCommand",
14551455
"mode": {"times": 1},
1456-
"data": {"failCommands": ["aggregate"], "blockTimeMS": 10000},
1456+
"data": {"failCommands": ["getMore"], "blockTimeMS": 10000},
14571457
}
1458-
cursor = client.db.test.aggregate([{"$changeStream": {}}])
1458+
cursor = client.db.test.aggregate([], batchSize=5)
14591459
with self.fail_point(fail_command):
14601460
with self.assertRaises(PyMongoError) as ctx:
14611461
cursor.to_list()

0 commit comments

Comments
 (0)