mongo-python-driver/test/csot/waitQueueTimeout.json
Shane Harvey 8b668898b8
PYTHON-5208 Add spec test for wait queue timeout errors do not clear the pool (#2199)
Also stop running the ping command to advance session cluster times in the unified tests.
2025-04-03 12:05:45 -07:00

177 lines
3.9 KiB
JSON

{
"description": "WaitQueueTimeoutError does not clear the pool",
"schemaVersion": "1.9",
"runOnRequirements": [
{
"minServerVersion": "4.4",
"topologies": [
"single",
"replicaset",
"sharded"
]
}
],
"createEntities": [
{
"client": {
"id": "failPointClient",
"useMultipleMongoses": false
}
},
{
"client": {
"id": "client",
"uriOptions": {
"maxPoolSize": 1,
"appname": "waitQueueTimeoutErrorTest"
},
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent",
"poolClearedEvent"
]
}
},
{
"database": {
"id": "database",
"client": "client",
"databaseName": "test"
}
}
],
"tests": [
{
"description": "WaitQueueTimeoutError does not clear the pool",
"operations": [
{
"name": "failPoint",
"object": "testRunner",
"arguments": {
"client": "failPointClient",
"failPoint": {
"configureFailPoint": "failCommand",
"mode": {
"times": 1
},
"data": {
"failCommands": [
"ping"
],
"blockConnection": true,
"blockTimeMS": 500,
"appName": "waitQueueTimeoutErrorTest"
}
}
}
},
{
"name": "createEntities",
"object": "testRunner",
"arguments": {
"entities": [
{
"thread": {
"id": "thread0"
}
}
]
}
},
{
"name": "runOnThread",
"object": "testRunner",
"arguments": {
"thread": "thread0",
"operation": {
"name": "runCommand",
"object": "database",
"arguments": {
"command": {
"ping": 1
},
"commandName": "ping"
}
}
}
},
{
"name": "waitForEvent",
"object": "testRunner",
"arguments": {
"client": "client",
"event": {
"commandStartedEvent": {
"commandName": "ping"
}
},
"count": 1
}
},
{
"name": "runCommand",
"object": "database",
"arguments": {
"timeoutMS": 100,
"command": {
"hello": 1
},
"commandName": "hello"
},
"expectError": {
"isTimeoutError": true
}
},
{
"name": "waitForThread",
"object": "testRunner",
"arguments": {
"thread": "thread0"
}
},
{
"name": "runCommand",
"object": "database",
"arguments": {
"command": {
"hello": 1
},
"commandName": "hello"
}
}
],
"expectEvents": [
{
"client": "client",
"eventType": "command",
"events": [
{
"commandStartedEvent": {
"commandName": "ping",
"databaseName": "test",
"command": {
"ping": 1
}
}
},
{
"commandStartedEvent": {
"commandName": "hello",
"databaseName": "test",
"command": {
"hello": 1
}
}
}
]
},
{
"client": "client",
"eventType": "cmap",
"events": []
}
]
}
]
}