| 1 |
runOn: |
| 2 |
- |
| 3 |
minServerVersion: "4.0" |
| 4 |
topology: ["single", "replicaset"] |
| 5 |
- |
| 6 |
minServerVersion: "4.1.7" |
| 7 |
topology: ["sharded", "load-balanced"] |
| 8 |
|
| 9 |
database_name: &database_name "retryable-reads-tests" |
| 10 |
collection_name: &collection_name "coll" |
| 11 |
|
| 12 |
data: [] |
| 13 |
|
| 14 |
tests: |
| 15 |
- |
| 16 |
description: "ListDatabases succeeds after InterruptedAtShutdown" |
| 17 |
failPoint: &failCommand_failPoint |
| 18 |
configureFailPoint: failCommand |
| 19 |
mode: { times: 1 } |
| 20 |
data: { failCommands: [listDatabases], errorCode: 11600 } |
| 21 |
operations: |
| 22 |
- &retryable_operation |
| 23 |
name: listDatabases |
| 24 |
object: client |
| 25 |
expectations: |
| 26 |
- &retryable_command_started_event |
| 27 |
command_started_event: |
| 28 |
command: |
| 29 |
listDatabases: 1 |
| 30 |
- *retryable_command_started_event |
| 31 |
- |
| 32 |
description: "ListDatabases succeeds after InterruptedDueToReplStateChange" |
| 33 |
failPoint: |
| 34 |
<<: *failCommand_failPoint |
| 35 |
data: { failCommands: [listDatabases], errorCode: 11602 } |
| 36 |
operations: [*retryable_operation] |
| 37 |
expectations: |
| 38 |
- *retryable_command_started_event |
| 39 |
- *retryable_command_started_event |
| 40 |
- |
| 41 |
description: "ListDatabases succeeds after NotWritablePrimary" |
| 42 |
failPoint: |
| 43 |
<<: *failCommand_failPoint |
| 44 |
data: { failCommands: [listDatabases], errorCode: 10107 } |
| 45 |
operations: [*retryable_operation] |
| 46 |
expectations: |
| 47 |
- *retryable_command_started_event |
| 48 |
- *retryable_command_started_event |
| 49 |
- |
| 50 |
description: "ListDatabases succeeds after NotPrimaryNoSecondaryOk" |
| 51 |
failPoint: |
| 52 |
<<: *failCommand_failPoint |
| 53 |
data: { failCommands: [listDatabases], errorCode: 13435 } |
| 54 |
operations: [*retryable_operation] |
| 55 |
expectations: |
| 56 |
- *retryable_command_started_event |
| 57 |
- *retryable_command_started_event |
| 58 |
- |
| 59 |
description: "ListDatabases succeeds after NotPrimaryOrSecondary" |
| 60 |
failPoint: |
| 61 |
<<: *failCommand_failPoint |
| 62 |
data: { failCommands: [listDatabases], errorCode: 13436 } |
| 63 |
operations: [*retryable_operation] |
| 64 |
expectations: |
| 65 |
- *retryable_command_started_event |
| 66 |
- *retryable_command_started_event |
| 67 |
- |
| 68 |
description: "ListDatabases succeeds after PrimarySteppedDown" |
| 69 |
failPoint: |
| 70 |
<<: *failCommand_failPoint |
| 71 |
data: { failCommands: [listDatabases], errorCode: 189 } |
| 72 |
operations: [*retryable_operation] |
| 73 |
expectations: |
| 74 |
- *retryable_command_started_event |
| 75 |
- *retryable_command_started_event |
| 76 |
- |
| 77 |
description: "ListDatabases succeeds after ShutdownInProgress" |
| 78 |
failPoint: |
| 79 |
<<: *failCommand_failPoint |
| 80 |
data: { failCommands: [listDatabases], errorCode: 91 } |
| 81 |
operations: [*retryable_operation] |
| 82 |
expectations: |
| 83 |
- *retryable_command_started_event |
| 84 |
- *retryable_command_started_event |
| 85 |
- |
| 86 |
description: "ListDatabases succeeds after HostNotFound" |
| 87 |
failPoint: |
| 88 |
<<: *failCommand_failPoint |
| 89 |
data: { failCommands: [listDatabases], errorCode: 7 } |
| 90 |
operations: [*retryable_operation] |
| 91 |
expectations: |
| 92 |
- *retryable_command_started_event |
| 93 |
- *retryable_command_started_event |
| 94 |
- |
| 95 |
description: "ListDatabases succeeds after HostUnreachable" |
| 96 |
failPoint: |
| 97 |
<<: *failCommand_failPoint |
| 98 |
data: { failCommands: [listDatabases], errorCode: 6 } |
| 99 |
operations: [*retryable_operation] |
| 100 |
expectations: |
| 101 |
- *retryable_command_started_event |
| 102 |
- *retryable_command_started_event |
| 103 |
- |
| 104 |
description: "ListDatabases succeeds after NetworkTimeout" |
| 105 |
failPoint: |
| 106 |
<<: *failCommand_failPoint |
| 107 |
data: { failCommands: [listDatabases], errorCode: 89 } |
| 108 |
operations: [*retryable_operation] |
| 109 |
expectations: |
| 110 |
- *retryable_command_started_event |
| 111 |
- *retryable_command_started_event |
| 112 |
- |
| 113 |
description: "ListDatabases succeeds after SocketException" |
| 114 |
failPoint: |
| 115 |
<<: *failCommand_failPoint |
| 116 |
data: { failCommands: [listDatabases], errorCode: 9001 } |
| 117 |
operations: [*retryable_operation] |
| 118 |
expectations: |
| 119 |
- *retryable_command_started_event |
| 120 |
- *retryable_command_started_event |
| 121 |
- |
| 122 |
description: "ListDatabases fails after two NotWritablePrimary errors" |
| 123 |
failPoint: |
| 124 |
<<: *failCommand_failPoint |
| 125 |
mode: { times: 2 } |
| 126 |
data: { failCommands: [listDatabases], errorCode: 10107 } |
| 127 |
operations: |
| 128 |
- &retryable_operation_fails |
| 129 |
<<: *retryable_operation |
| 130 |
error: true |
| 131 |
expectations: |
| 132 |
- *retryable_command_started_event |
| 133 |
- *retryable_command_started_event |
| 134 |
- |
| 135 |
description: "ListDatabases fails after NotWritablePrimary when retryReads is false" |
| 136 |
clientOptions: |
| 137 |
retryReads: false |
| 138 |
failPoint: |
| 139 |
<<: *failCommand_failPoint |
| 140 |
data: { failCommands: [listDatabases], errorCode: 10107 } |
| 141 |
operations: [*retryable_operation_fails] |
| 142 |
expectations: |
| 143 |
- *retryable_command_started_event |
| 144 |
|