Skip to content

Commit 5e7921b

Browse files
GODRIVER-3444 Update unified spect tests
1 parent 2da2627 commit 5e7921b

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

testdata/client-side-operations-timeout/tailable-awaitData.json

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,13 @@
426426
"name": "createFindCursor",
427427
"object": "collection",
428428
"arguments": {
429-
"filter": {},
429+
"filter": {
430+
"_id": 1
431+
},
430432
"cursorType": "tailableAwait",
431433
"batchSize": 1,
432434
"maxAwaitTimeMS": 100,
433-
"timeoutMS": 50
435+
"timeoutMS": 200
434436
},
435437
"saveResultAsEntity": "tailableCursor"
436438
},
@@ -439,13 +441,17 @@
439441
"object": "tailableCursor"
440442
},
441443
{
442-
"name": "iterateOnce",
443-
"object": "tailableCursor"
444+
"name": "iterateUntilDocumentOrError",
445+
"object": "tailableCursor",
446+
"expectError": {
447+
"isTimeoutError": true
448+
}
444449
}
445450
],
446451
"expectEvents": [
447452
{
448453
"client": "client",
454+
"ignoreExtraEvents": true,
449455
"events": [
450456
{
451457
"commandStartedEvent": {
@@ -459,7 +465,18 @@
459465
"databaseName": "test",
460466
"command": {
461467
"maxTimeMS": {
462-
"$$lte": 50
468+
"$$lte": 100
469+
}
470+
}
471+
}
472+
},
473+
{
474+
"commandStartedEvent": {
475+
"commandName": "getMore",
476+
"databaseName": "test",
477+
"command": {
478+
"maxTimeMS": {
479+
"$$lte": 99
463480
}
464481
}
465482
}

testdata/client-side-operations-timeout/tailable-awaitData.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,19 +252,21 @@ tests:
252252
- name: createFindCursor
253253
object: *collection
254254
arguments:
255-
filter: {}
255+
filter: { _id: 1 }
256256
cursorType: tailableAwait
257257
batchSize: 1
258258
maxAwaitTimeMS: 100
259-
timeoutMS: 50
259+
timeoutMS: 200
260260
saveResultAsEntity: &tailableCursor tailableCursor
261-
# Iterate twice to force a getMore.
262261
- name: iterateOnce
263262
object: *tailableCursor
264-
- name: iterateOnce
263+
- name: iterateUntilDocumentOrError
265264
object: *tailableCursor
265+
expectError:
266+
isTimeoutError: true
266267
expectEvents:
267268
- client: *client
269+
ignoreExtraEvents: true
268270
events:
269271
- commandStartedEvent:
270272
commandName: find
@@ -273,7 +275,12 @@ tests:
273275
commandName: getMore
274276
databaseName: *databaseName
275277
command:
276-
maxTimeMS: { $$lte: 50 }
278+
maxTimeMS: { $$lte: 100 }
279+
- commandStartedEvent:
280+
commandName: getMore
281+
databaseName: *databaseName
282+
command:
283+
maxTimeMS: { $$lte: 99 }
277284

278285
- description: "apply maxAwaitTimeMS if less than remaining timeout"
279286
operations:

0 commit comments

Comments
 (0)