230 lines
4.9 KiB
JSON
230 lines
4.9 KiB
JSON
{
|
|
"description": "listDatabases",
|
|
"schemaVersion": "1.9",
|
|
"runOnRequirements": [
|
|
{
|
|
"minServerVersion": "4.0",
|
|
"topologies": [
|
|
"single",
|
|
"replicaset"
|
|
]
|
|
},
|
|
{
|
|
"minServerVersion": "4.1.7",
|
|
"topologies": [
|
|
"sharded",
|
|
"load-balanced"
|
|
]
|
|
}
|
|
],
|
|
"createEntities": [
|
|
{
|
|
"client": {
|
|
"id": "client0",
|
|
"useMultipleMongoses": false,
|
|
"observeEvents": [
|
|
"commandStartedEvent"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"initialData": [
|
|
{
|
|
"collectionName": "coll",
|
|
"databaseName": "retryable-reads-tests",
|
|
"documents": []
|
|
}
|
|
],
|
|
"tests": [
|
|
{
|
|
"description": "ListDatabases succeeds on first attempt",
|
|
"operations": [
|
|
{
|
|
"object": "client0",
|
|
"name": "listDatabases"
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"listDatabases": 1
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "ListDatabases succeeds on second attempt",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"listDatabases"
|
|
],
|
|
"closeConnection": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "client0",
|
|
"name": "listDatabases"
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"listDatabases": 1
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"listDatabases": 1
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "ListDatabases fails on first attempt",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "createEntities",
|
|
"arguments": {
|
|
"entities": [
|
|
{
|
|
"client": {
|
|
"id": "client1",
|
|
"useMultipleMongoses": false,
|
|
"uriOptions": {
|
|
"retryReads": false
|
|
},
|
|
"observeEvents": [
|
|
"commandStartedEvent"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client1",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 1
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"listDatabases"
|
|
],
|
|
"closeConnection": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "client1",
|
|
"name": "listDatabases",
|
|
"expectError": {
|
|
"isError": true
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client1",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"listDatabases": 1
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "ListDatabases fails on second attempt",
|
|
"operations": [
|
|
{
|
|
"object": "testRunner",
|
|
"name": "failPoint",
|
|
"arguments": {
|
|
"client": "client0",
|
|
"failPoint": {
|
|
"configureFailPoint": "failCommand",
|
|
"mode": {
|
|
"times": 2
|
|
},
|
|
"data": {
|
|
"failCommands": [
|
|
"listDatabases"
|
|
],
|
|
"closeConnection": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "client0",
|
|
"name": "listDatabases",
|
|
"expectError": {
|
|
"isError": true
|
|
}
|
|
}
|
|
],
|
|
"expectEvents": [
|
|
{
|
|
"client": "client0",
|
|
"events": [
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"listDatabases": 1
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"commandStartedEvent": {
|
|
"command": {
|
|
"listDatabases": 1
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|