{
  "runOn": [
    {
      "minServerVersion": "4.0",
      "topology": [
        "replicaset"
      ]
    },
    {
      "minServerVersion": "4.2",
      "topology": [
        "sharded"
      ]
    }
  ],
  "database_name": "sdam-tests",
  "collection_name": "cancel-server-check",
  "data": [],
  "tests": [
    {
      "description": "Cancel server check",
      "clientOptions": {
        "retryWrites": true,
        "heartbeatFrequencyMS": 10000,
        "serverSelectionTimeoutMS": 5000,
        "appname": "cancelServerCheckTest"
      },
      "operations": [
        {
          "name": "insertOne",
          "object": "collection",
          "arguments": {
            "document": {
              "_id": 1
            }
          }
        },
        {
          "name": "configureFailPoint",
          "object": "testRunner",
          "arguments": {
            "failPoint": {
              "configureFailPoint": "failCommand",
              "mode": {
                "times": 1
              },
              "data": {
                "failCommands": [
                  "insert"
                ],
                "closeConnection": true
              }
            }
          }
        },
        {
          "name": "insertOne",
          "object": "collection",
          "arguments": {
            "document": {
              "_id": 2
            }
          },
          "result": {
            "insertedId": 2
          }
        },
        {
          "name": "waitForEvent",
          "object": "testRunner",
          "arguments": {
            "event": "ServerMarkedUnknownEvent",
            "count": 1
          }
        },
        {
          "name": "waitForEvent",
          "object": "testRunner",
          "arguments": {
            "event": "PoolClearedEvent",
            "count": 1
          }
        },
        {
          "name": "insertOne",
          "object": "collection",
          "arguments": {
            "document": {
              "_id": 3
            }
          },
          "result": {
            "insertedId": 3
          }
        },
        {
          "name": "assertEventCount",
          "object": "testRunner",
          "arguments": {
            "event": "ServerMarkedUnknownEvent",
            "count": 1
          }
        },
        {
          "name": "assertEventCount",
          "object": "testRunner",
          "arguments": {
            "event": "PoolClearedEvent",
            "count": 1
          }
        }
      ],
      "outcome": {
        "collection": {
          "data": [
            {
              "_id": 1
            },
            {
              "_id": 2
            },
            {
              "_id": 3
            }
          ]
        }
      }
    }
  ]
}
