|
| 1 | +{ |
| 2 | + "description": "ReadConcernMajorityNotAvailableYet is a retryable read", |
| 3 | + "schemaVersion": "1.3", |
| 4 | + "runOnRequirements": [ |
| 5 | + { |
| 6 | + "minServerVersion": "4.0", |
| 7 | + "topologies": [ |
| 8 | + "single", |
| 9 | + "replicaset" |
| 10 | + ] |
| 11 | + }, |
| 12 | + { |
| 13 | + "minServerVersion": "4.1.7", |
| 14 | + "topologies": [ |
| 15 | + "sharded", |
| 16 | + "load-balanced" |
| 17 | + ] |
| 18 | + } |
| 19 | + ], |
| 20 | + "createEntities": [ |
| 21 | + { |
| 22 | + "client": { |
| 23 | + "id": "client0", |
| 24 | + "useMultipleMongoses": false, |
| 25 | + "observeEvents": [ |
| 26 | + "commandStartedEvent" |
| 27 | + ] |
| 28 | + } |
| 29 | + }, |
| 30 | + { |
| 31 | + "database": { |
| 32 | + "id": "database0", |
| 33 | + "client": "client0", |
| 34 | + "databaseName": "retryable-reads-tests" |
| 35 | + } |
| 36 | + }, |
| 37 | + { |
| 38 | + "collection": { |
| 39 | + "id": "collection0", |
| 40 | + "database": "database0", |
| 41 | + "collectionName": "readconcernmajoritynotavailableyet_test" |
| 42 | + } |
| 43 | + } |
| 44 | + ], |
| 45 | + "initialData": [ |
| 46 | + { |
| 47 | + "collectionName": "readconcernmajoritynotavailableyet_test", |
| 48 | + "databaseName": "retryable-reads-tests", |
| 49 | + "documents": [ |
| 50 | + { |
| 51 | + "_id": 1, |
| 52 | + "x": 11 |
| 53 | + }, |
| 54 | + { |
| 55 | + "_id": 2, |
| 56 | + "x": 22 |
| 57 | + }, |
| 58 | + { |
| 59 | + "_id": 3, |
| 60 | + "x": 33 |
| 61 | + } |
| 62 | + ] |
| 63 | + } |
| 64 | + ], |
| 65 | + "tests": [ |
| 66 | + { |
| 67 | + "description": "Find succeeds on second attempt after ReadConcernMajorityNotAvailableYet", |
| 68 | + "operations": [ |
| 69 | + { |
| 70 | + "name": "failPoint", |
| 71 | + "object": "testRunner", |
| 72 | + "arguments": { |
| 73 | + "client": "client0", |
| 74 | + "failPoint": { |
| 75 | + "configureFailPoint": "failCommand", |
| 76 | + "mode": { |
| 77 | + "times": 1 |
| 78 | + }, |
| 79 | + "data": { |
| 80 | + "failCommands": [ |
| 81 | + "find" |
| 82 | + ], |
| 83 | + "errorCode": 134 |
| 84 | + } |
| 85 | + } |
| 86 | + } |
| 87 | + }, |
| 88 | + { |
| 89 | + "name": "find", |
| 90 | + "arguments": { |
| 91 | + "filter": { |
| 92 | + "_id": { |
| 93 | + "$gt": 1 |
| 94 | + } |
| 95 | + } |
| 96 | + }, |
| 97 | + "object": "collection0", |
| 98 | + "expectResult": [ |
| 99 | + { |
| 100 | + "_id": 2, |
| 101 | + "x": 22 |
| 102 | + }, |
| 103 | + { |
| 104 | + "_id": 3, |
| 105 | + "x": 33 |
| 106 | + } |
| 107 | + ] |
| 108 | + } |
| 109 | + ], |
| 110 | + "expectEvents": [ |
| 111 | + { |
| 112 | + "client": "client0", |
| 113 | + "events": [ |
| 114 | + { |
| 115 | + "commandStartedEvent": { |
| 116 | + "command": { |
| 117 | + "find": "readconcernmajoritynotavailableyet_test", |
| 118 | + "filter": { |
| 119 | + "_id": { |
| 120 | + "$gt": 1 |
| 121 | + } |
| 122 | + } |
| 123 | + }, |
| 124 | + "commandName": "find", |
| 125 | + "databaseName": "retryable-reads-tests" |
| 126 | + } |
| 127 | + }, |
| 128 | + { |
| 129 | + "commandStartedEvent": { |
| 130 | + "command": { |
| 131 | + "find": "readconcernmajoritynotavailableyet_test", |
| 132 | + "filter": { |
| 133 | + "_id": { |
| 134 | + "$gt": 1 |
| 135 | + } |
| 136 | + } |
| 137 | + }, |
| 138 | + "commandName": "find", |
| 139 | + "databaseName": "retryable-reads-tests" |
| 140 | + } |
| 141 | + } |
| 142 | + ] |
| 143 | + } |
| 144 | + ] |
| 145 | + } |
| 146 | + ] |
| 147 | +} |
0 commit comments