1{ 2 "runOn": [ 3 { 4 "minServerVersion": "4.0", 5 "topology": [ 6 "single", 7 "replicaset" 8 ] 9 }, 10 { 11 "minServerVersion": "4.1.7", 12 "topology": [ 13 "sharded" 14 ] 15 } 16 ], 17 "database_name": "retryable-reads-tests", 18 "collection_name": "coll", 19 "data": [], 20 "tests": [ 21 { 22 "description": "ListCollectionNames succeeds on first attempt", 23 "operations": [ 24 { 25 "name": "listCollectionNames", 26 "object": "database" 27 } 28 ], 29 "expectations": [ 30 { 31 "command_started_event": { 32 "command": { 33 "listCollections": 1 34 } 35 } 36 } 37 ] 38 }, 39 { 40 "description": "ListCollectionNames succeeds on second attempt", 41 "failPoint": { 42 "configureFailPoint": "failCommand", 43 "mode": { 44 "times": 1 45 }, 46 "data": { 47 "failCommands": [ 48 "listCollections" 49 ], 50 "closeConnection": true 51 } 52 }, 53 "operations": [ 54 { 55 "name": "listCollectionNames", 56 "object": "database" 57 } 58 ], 59 "expectations": [ 60 { 61 "command_started_event": { 62 "command": { 63 "listCollections": 1 64 } 65 } 66 }, 67 { 68 "command_started_event": { 69 "command": { 70 "listCollections": 1 71 } 72 } 73 } 74 ] 75 }, 76 { 77 "description": "ListCollectionNames fails on first attempt", 78 "clientOptions": { 79 "retryReads": false 80 }, 81 "failPoint": { 82 "configureFailPoint": "failCommand", 83 "mode": { 84 "times": 1 85 }, 86 "data": { 87 "failCommands": [ 88 "listCollections" 89 ], 90 "closeConnection": true 91 } 92 }, 93 "operations": [ 94 { 95 "name": "listCollectionNames", 96 "object": "database", 97 "error": true 98 } 99 ], 100 "expectations": [ 101 { 102 "command_started_event": { 103 "command": { 104 "listCollections": 1 105 } 106 } 107 } 108 ] 109 }, 110 { 111 "description": "ListCollectionNames fails on second attempt", 112 "failPoint": { 113 "configureFailPoint": "failCommand", 114 "mode": { 115 "times": 2 116 }, 117 "data": { 118 "failCommands": [ 119 "listCollections" 120 ], 121 "closeConnection": true 122 } 123 }, 124 "operations": [ 125 { 126 "name": "listCollectionNames", 127 "object": "database", 128 "error": true 129 } 130 ], 131 "expectations": [ 132 { 133 "command_started_event": { 134 "command": { 135 "listCollections": 1 136 } 137 } 138 }, 139 { 140 "command_started_event": { 141 "command": { 142 "listCollections": 1 143 } 144 } 145 } 146 ] 147 } 148 ] 149} 150