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": "ListIndexes succeeds on first attempt",
23      "operations": [
24        {
25          "name": "listIndexes",
26          "object": "collection"
27        }
28      ],
29      "expectations": [
30        {
31          "command_started_event": {
32            "command": {
33              "listIndexes": "coll"
34            },
35            "database_name": "retryable-reads-tests"
36          }
37        }
38      ]
39    },
40    {
41      "description": "ListIndexes succeeds on second attempt",
42      "failPoint": {
43        "configureFailPoint": "failCommand",
44        "mode": {
45          "times": 1
46        },
47        "data": {
48          "failCommands": [
49            "listIndexes"
50          ],
51          "closeConnection": true
52        }
53      },
54      "operations": [
55        {
56          "name": "listIndexes",
57          "object": "collection"
58        }
59      ],
60      "expectations": [
61        {
62          "command_started_event": {
63            "command": {
64              "listIndexes": "coll"
65            },
66            "database_name": "retryable-reads-tests"
67          }
68        },
69        {
70          "command_started_event": {
71            "command": {
72              "listIndexes": "coll"
73            },
74            "database_name": "retryable-reads-tests"
75          }
76        }
77      ]
78    },
79    {
80      "description": "ListIndexes fails on first attempt",
81      "clientOptions": {
82        "retryReads": false
83      },
84      "failPoint": {
85        "configureFailPoint": "failCommand",
86        "mode": {
87          "times": 1
88        },
89        "data": {
90          "failCommands": [
91            "listIndexes"
92          ],
93          "closeConnection": true
94        }
95      },
96      "operations": [
97        {
98          "name": "listIndexes",
99          "object": "collection",
100          "error": true
101        }
102      ],
103      "expectations": [
104        {
105          "command_started_event": {
106            "command": {
107              "listIndexes": "coll"
108            },
109            "database_name": "retryable-reads-tests"
110          }
111        }
112      ]
113    },
114    {
115      "description": "ListIndexes fails on second attempt",
116      "failPoint": {
117        "configureFailPoint": "failCommand",
118        "mode": {
119          "times": 2
120        },
121        "data": {
122          "failCommands": [
123            "listIndexes"
124          ],
125          "closeConnection": true
126        }
127      },
128      "operations": [
129        {
130          "name": "listIndexes",
131          "object": "collection",
132          "error": true
133        }
134      ],
135      "expectations": [
136        {
137          "command_started_event": {
138            "command": {
139              "listIndexes": "coll"
140            },
141            "database_name": "retryable-reads-tests"
142          }
143        },
144        {
145          "command_started_event": {
146            "command": {
147              "listIndexes": "coll"
148            },
149            "database_name": "retryable-reads-tests"
150          }
151        }
152      ]
153    }
154  ]
155}
156