PYTHON-5496 Update CSOT tests for change in dropIndex behavior in 8.3 (#2498)

This commit is contained in:
Steven Silvester 2025-08-20 18:42:06 -05:00 committed by GitHub
parent f7b94be0db
commit 9a9a65c617
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 183 additions and 30 deletions

View File

@ -591,8 +591,6 @@ class UnifiedSpecTestMixinV1(AsyncIntegrationTest):
self.skipTest("CSOT not implemented for watch()")
if "cursors" in class_name:
self.skipTest("CSOT not implemented for cursors")
if "dropindex on collection" in description:
self.skipTest("PYTHON-5491")
if (
"tailable" in class_name
or "tailable" in description

View File

@ -6750,16 +6750,23 @@
}
}
},
{
"name": "createIndex",
"object": "collection",
"arguments": {
"keys": {
"x": 1
},
"timeoutMS": 100000,
"name": "x_1"
}
},
{
"name": "dropIndex",
"object": "collection",
"arguments": {
"timeoutMS": 100000,
"name": "x_1"
},
"expectError": {
"isClientError": false,
"isTimeoutError": false
}
}
]
@ -6815,16 +6822,23 @@
]
}
},
{
"name": "createIndex",
"object": "collection",
"arguments": {
"keys": {
"x": 1
},
"timeoutMS": 100000,
"name": "x_1"
}
},
{
"name": "dropIndex",
"object": "collection",
"arguments": {
"timeoutMS": 100000,
"name": "x_1"
},
"expectError": {
"isClientError": false,
"isTimeoutError": false
}
}
],
@ -6832,6 +6846,12 @@
{
"client": "client",
"events": [
{
"commandStartedEvent": {
"commandName": "createIndexes",
"databaseName": "test"
}
},
{
"commandStartedEvent": {
"commandName": "dropIndexes",
@ -6903,6 +6923,16 @@
]
}
},
{
"name": "createIndex",
"object": "collection",
"arguments": {
"keys": {
"x": 1
},
"name": "x_1"
}
},
{
"name": "dropIndex",
"object": "collection",
@ -6910,10 +6940,6 @@
"timeoutMS": 1000,
"maxTimeMS": 5000,
"name": "x_1"
},
"expectError": {
"isClientError": false,
"isTimeoutError": false
}
}
],
@ -6921,6 +6947,12 @@
{
"client": "client",
"events": [
{
"commandStartedEvent": {
"commandName": "createIndexes",
"databaseName": "test"
}
},
{
"commandStartedEvent": {
"commandName": "dropIndexes",
@ -7003,6 +7035,17 @@
}
}
},
{
"name": "createIndex",
"object": "collection",
"arguments": {
"keys": {
"x": 1
},
"name": "x_1",
"timeoutMS": 100000
}
},
{
"name": "dropIndexes",
"object": "collection",

View File

@ -5621,15 +5621,21 @@
}
}
},
{
"name": "createIndex",
"object": "collection",
"arguments": {
"keys": {
"x": 1
},
"name": "x_1"
}
},
{
"name": "dropIndex",
"object": "collection",
"arguments": {
"name": "x_1"
},
"expectError": {
"isClientError": false,
"isTimeoutError": false
}
}
],
@ -5637,6 +5643,12 @@
{
"client": "client",
"events": [
{
"commandStartedEvent": {
"commandName": "createIndexes",
"databaseName": "test"
}
},
{
"commandStartedEvent": {
"commandName": "dropIndexes",

View File

@ -3378,15 +3378,23 @@
}
}
},
{
"name": "createIndex",
"object": "collection",
"arguments": {
"keys": {
"x": 1
},
"timeoutMS": 1000,
"name": "x_1"
}
},
{
"name": "dropIndex",
"object": "collection",
"arguments": {
"timeoutMS": 1000,
"name": "x_1"
},
"expectError": {
"isTimeoutError": false
}
}
],
@ -3394,6 +3402,12 @@
{
"client": "client",
"events": [
{
"commandStartedEvent": {
"commandName": "createIndexes",
"databaseName": "test"
}
},
{
"commandStartedEvent": {
"commandName": "dropIndexes",
@ -3436,15 +3450,23 @@
}
}
},
{
"name": "createIndex",
"object": "collection",
"arguments": {
"keys": {
"x": 1
},
"timeoutMS": 0,
"name": "x_1"
}
},
{
"name": "dropIndex",
"object": "collection",
"arguments": {
"timeoutMS": 0,
"name": "x_1"
},
"expectError": {
"isTimeoutError": false
}
}
],
@ -3452,6 +3474,12 @@
{
"client": "client",
"events": [
{
"commandStartedEvent": {
"commandName": "createIndexes",
"databaseName": "test"
}
},
{
"commandStartedEvent": {
"commandName": "dropIndexes",

View File

@ -78,7 +78,7 @@
]
},
{
"description": "error if maxAwaitTimeMS is greater than timeoutMS",
"description": "error on find if maxAwaitTimeMS is greater than timeoutMS",
"operations": [
{
"name": "find",
@ -90,13 +90,50 @@
"maxAwaitTimeMS": 10
},
"expectError": {
"isClientError": true
"isClientError": true,
"isTimeoutError": false
}
}
]
},
{
"description": "error if maxAwaitTimeMS is equal to timeoutMS",
"description": "error on aggregate if maxAwaitTimeMS is greater than timeoutMS",
"operations": [
{
"name": "aggregate",
"object": "collection",
"arguments": {
"pipeline": [],
"timeoutMS": 5,
"maxAwaitTimeMS": 10
},
"expectError": {
"isClientError": true,
"isTimeoutError": false
}
}
]
},
{
"description": "error on watch if maxAwaitTimeMS is greater than timeoutMS",
"operations": [
{
"name": "createChangeStream",
"object": "collection",
"arguments": {
"pipeline": [],
"timeoutMS": 5,
"maxAwaitTimeMS": 10
},
"expectError": {
"isClientError": true,
"isTimeoutError": false
}
}
]
},
{
"description": "error on find if maxAwaitTimeMS is equal to timeoutMS",
"operations": [
{
"name": "find",
@ -108,7 +145,44 @@
"maxAwaitTimeMS": 5
},
"expectError": {
"isClientError": true
"isClientError": true,
"isTimeoutError": false
}
}
]
},
{
"description": "error on aggregate if maxAwaitTimeMS is equal to timeoutMS",
"operations": [
{
"name": "aggregate",
"object": "collection",
"arguments": {
"pipeline": [],
"timeoutMS": 5,
"maxAwaitTimeMS": 5
},
"expectError": {
"isClientError": true,
"isTimeoutError": false
}
}
]
},
{
"description": "error on watch if maxAwaitTimeMS is equal to timeoutMS",
"operations": [
{
"name": "createChangeStream",
"object": "collection",
"arguments": {
"pipeline": [],
"timeoutMS": 5,
"maxAwaitTimeMS": 5
},
"expectError": {
"isClientError": true,
"isTimeoutError": false
}
}
]

View File

@ -590,8 +590,6 @@ class UnifiedSpecTestMixinV1(IntegrationTest):
self.skipTest("CSOT not implemented for watch()")
if "cursors" in class_name:
self.skipTest("CSOT not implemented for cursors")
if "dropindex on collection" in description:
self.skipTest("PYTHON-5491")
if (
"tailable" in class_name
or "tailable" in description