...
1runOn:
2 -
3 minServerVersion: "4.0"
4 topology: ["replicaset"]
5 -
6 minServerVersion: "4.1.7"
7 topology: ["sharded", "load-balanced"]
8 serverless: "forbid"
9
10database_name: &database_name "retryable-reads-tests"
11collection_name: &collection_name "coll"
12
13data:
14 - {_id: 1, x: 11}
15
16tests:
17 -
18 description: "client.watch succeeds on first attempt"
19 operations:
20 - &retryable_operation
21 name: watch
22 object: client
23 expectations:
24 - &retryable_command_started_event
25 command_started_event:
26 command:
27 aggregate: 1
28 cursor: {}
29 pipeline: [ { $changeStream: { "allChangesForCluster": true } } ]
30 database_name: admin
31 -
32 description: "client.watch succeeds on second attempt"
33 failPoint: &failCommand_failPoint
34 configureFailPoint: failCommand
35 mode: { times: 1 }
36 data:
37 failCommands: [aggregate]
38 closeConnection: true
39 operations: [*retryable_operation]
40 expectations:
41 - *retryable_command_started_event
42 - *retryable_command_started_event
43 -
44 description: "client.watch fails on first attempt"
45 clientOptions:
46 retryReads: false
47 failPoint: *failCommand_failPoint
48 operations:
49 - &retryable_operation_fails
50 <<: *retryable_operation
51 error: true
52 expectations:
53 - *retryable_command_started_event
54 -
55 description: "client.watch fails on second attempt"
56 failPoint:
57 <<: *failCommand_failPoint
58 mode: { times: 2 }
59 operations: [*retryable_operation_fails]
60 expectations:
61 - *retryable_command_started_event
62 - *retryable_command_started_event
View as plain text