{
  "runOn": [
    {
      "minServerVersion": "4.0",
      "topology": [
        "single",
        "replicaset"
      ]
    },
    {
      "minServerVersion": "4.1.7",
      "topology": [
        "sharded",
        "load-balanced"
      ]
    }
  ],
  "database_name": "retryable-reads-tests",
  "collection_name": "coll",
  "data": [],
  "tests": [
    {
      "description": "ListCollectionObjects succeeds on first attempt",
      "operations": [
        {
          "name": "listCollectionObjects",
          "object": "database"
        }
      ],
      "expectations": [
        {
          "command_started_event": {
            "command": {
              "listCollections": 1
            }
          }
        }
      ]
    },
    {
      "description": "ListCollectionObjects succeeds on second attempt",
      "failPoint": {
        "configureFailPoint": "failCommand",
        "mode": {
          "times": 1
        },
        "data": {
          "failCommands": [
            "listCollections"
          ],
          "closeConnection": true
        }
      },
      "operations": [
        {
          "name": "listCollectionObjects",
          "object": "database"
        }
      ],
      "expectations": [
        {
          "command_started_event": {
            "command": {
              "listCollections": 1
            }
          }
        },
        {
          "command_started_event": {
            "command": {
              "listCollections": 1
            }
          }
        }
      ]
    },
    {
      "description": "ListCollectionObjects fails on first attempt",
      "clientOptions": {
        "retryReads": false
      },
      "failPoint": {
        "configureFailPoint": "failCommand",
        "mode": {
          "times": 1
        },
        "data": {
          "failCommands": [
            "listCollections"
          ],
          "closeConnection": true
        }
      },
      "operations": [
        {
          "name": "listCollectionObjects",
          "object": "database",
          "error": true
        }
      ],
      "expectations": [
        {
          "command_started_event": {
            "command": {
              "listCollections": 1
            }
          }
        }
      ]
    },
    {
      "description": "ListCollectionObjects fails on second attempt",
      "failPoint": {
        "configureFailPoint": "failCommand",
        "mode": {
          "times": 2
        },
        "data": {
          "failCommands": [
            "listCollections"
          ],
          "closeConnection": true
        }
      },
      "operations": [
        {
          "name": "listCollectionObjects",
          "object": "database",
          "error": true
        }
      ],
      "expectations": [
        {
          "command_started_event": {
            "command": {
              "listCollections": 1
            }
          }
        },
        {
          "command_started_event": {
            "command": {
              "listCollections": 1
            }
          }
        }
      ]
    }
  ]
}
