|
| 1 | +{ |
| 2 | + "description": "tests that connections are returned to the pool on retry attempts for overload errors", |
| 3 | + "schemaVersion": "1.3", |
| 4 | + "runOnRequirements": [ |
| 5 | + { |
| 6 | + "minServerVersion": "4.4", |
| 7 | + "topologies": [ |
| 8 | + "replicaset", |
| 9 | + "sharded", |
| 10 | + "load-balanced" |
| 11 | + ] |
| 12 | + } |
| 13 | + ], |
| 14 | + "createEntities": [ |
| 15 | + { |
| 16 | + "client": { |
| 17 | + "id": "client", |
| 18 | + "useMultipleMongoses": false, |
| 19 | + "observeEvents": [ |
| 20 | + "commandStartedEvent", |
| 21 | + "commandFailedEvent", |
| 22 | + "connectionCheckedInEvent" |
| 23 | + ], |
| 24 | + "ignoreCommandMonitoringEvents": [ |
| 25 | + "killCursors" |
| 26 | + ] |
| 27 | + } |
| 28 | + }, |
| 29 | + { |
| 30 | + "client": { |
| 31 | + "id": "fail_point_client", |
| 32 | + "useMultipleMongoses": false |
| 33 | + } |
| 34 | + }, |
| 35 | + { |
| 36 | + "database": { |
| 37 | + "id": "database", |
| 38 | + "client": "client", |
| 39 | + "databaseName": "retryable-writes-tests" |
| 40 | + } |
| 41 | + }, |
| 42 | + { |
| 43 | + "collection": { |
| 44 | + "id": "collection", |
| 45 | + "database": "database", |
| 46 | + "collectionName": "coll" |
| 47 | + } |
| 48 | + } |
| 49 | + ], |
| 50 | + "initialData": [ |
| 51 | + { |
| 52 | + "collectionName": "coll", |
| 53 | + "databaseName": "retryable-writes-tests", |
| 54 | + "documents": [ |
| 55 | + { |
| 56 | + "_id": 1, |
| 57 | + "x": 11 |
| 58 | + } |
| 59 | + ] |
| 60 | + } |
| 61 | + ], |
| 62 | + "tests": [ |
| 63 | + { |
| 64 | + "description": "overload error retry attempts return connections to the pool", |
| 65 | + "operations": [ |
| 66 | + { |
| 67 | + "name": "failPoint", |
| 68 | + "object": "testRunner", |
| 69 | + "arguments": { |
| 70 | + "client": "fail_point_client", |
| 71 | + "failPoint": { |
| 72 | + "configureFailPoint": "failCommand", |
| 73 | + "mode": "alwaysOn", |
| 74 | + "data": { |
| 75 | + "failCommands": [ |
| 76 | + "find" |
| 77 | + ], |
| 78 | + "errorLabels": [ |
| 79 | + "RetryableError", |
| 80 | + "SystemOverloadedError" |
| 81 | + ], |
| 82 | + "errorCode": 2 |
| 83 | + } |
| 84 | + } |
| 85 | + } |
| 86 | + }, |
| 87 | + { |
| 88 | + "name": "find", |
| 89 | + "object": "collection", |
| 90 | + "arguments": { |
| 91 | + "filter": {} |
| 92 | + }, |
| 93 | + "expectError": { |
| 94 | + "isError": true, |
| 95 | + "isClientError": false |
| 96 | + } |
| 97 | + } |
| 98 | + ], |
| 99 | + "expectEvents": [ |
| 100 | + { |
| 101 | + "client": "client", |
| 102 | + "eventType": "all", |
| 103 | + "events": [ |
| 104 | + { |
| 105 | + "commandStartedEvent": { |
| 106 | + "commandName": "find" |
| 107 | + } |
| 108 | + }, |
| 109 | + { |
| 110 | + "commandFailedEvent": { |
| 111 | + "commandName": "find" |
| 112 | + } |
| 113 | + }, |
| 114 | + { |
| 115 | + "connectionCheckedInEvent": {} |
| 116 | + }, |
| 117 | + { |
| 118 | + "commandStartedEvent": { |
| 119 | + "commandName": "find" |
| 120 | + } |
| 121 | + }, |
| 122 | + { |
| 123 | + "commandFailedEvent": { |
| 124 | + "commandName": "find" |
| 125 | + } |
| 126 | + }, |
| 127 | + { |
| 128 | + "connectionCheckedInEvent": {} |
| 129 | + }, |
| 130 | + { |
| 131 | + "commandStartedEvent": { |
| 132 | + "commandName": "find" |
| 133 | + } |
| 134 | + }, |
| 135 | + { |
| 136 | + "commandFailedEvent": { |
| 137 | + "commandName": "find" |
| 138 | + } |
| 139 | + }, |
| 140 | + { |
| 141 | + "connectionCheckedInEvent": {} |
| 142 | + }, |
| 143 | + { |
| 144 | + "commandStartedEvent": { |
| 145 | + "commandName": "find" |
| 146 | + } |
| 147 | + }, |
| 148 | + { |
| 149 | + "commandFailedEvent": { |
| 150 | + "commandName": "find" |
| 151 | + } |
| 152 | + }, |
| 153 | + { |
| 154 | + "connectionCheckedInEvent": {} |
| 155 | + }, |
| 156 | + { |
| 157 | + "commandStartedEvent": { |
| 158 | + "commandName": "find" |
| 159 | + } |
| 160 | + }, |
| 161 | + { |
| 162 | + "commandFailedEvent": { |
| 163 | + "commandName": "find" |
| 164 | + } |
| 165 | + }, |
| 166 | + { |
| 167 | + "connectionCheckedInEvent": {} |
| 168 | + }, |
| 169 | + { |
| 170 | + "commandStartedEvent": { |
| 171 | + "commandName": "find" |
| 172 | + } |
| 173 | + }, |
| 174 | + { |
| 175 | + "commandFailedEvent": { |
| 176 | + "commandName": "find" |
| 177 | + } |
| 178 | + }, |
| 179 | + { |
| 180 | + "connectionCheckedInEvent": {} |
| 181 | + } |
| 182 | + ] |
| 183 | + } |
| 184 | + ] |
| 185 | + } |
| 186 | + ] |
| 187 | +} |
0 commit comments