Skip to content

Commit 46bd0a7

Browse files
committed
PYTHON-5496 Update CSOT tests for change in dropIndex behavior in 8.3
1 parent db3d3c7 commit 46bd0a7

10 files changed

+8351
-32
lines changed

test/asynchronous/test_collection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ async def test_create_index(self):
336336
await db.test.create_index({"hello": 1}.items()) # type:ignore[arg-type]
337337

338338
# TODO: PYTHON-5491 - remove version max
339-
@async_client_context.require_version_max(8, 0, -1)
340339
async def test_drop_index(self):
341340
db = self.db
342341
await db.test.drop_indexes()

test/asynchronous/unified_format.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,6 @@ def maybe_skip_test(self, spec):
564564
self.skipTest("CSOT not implemented for watch()")
565565
if "cursors" in class_name:
566566
self.skipTest("CSOT not implemented for cursors")
567-
if "dropindex on collection" in description:
568-
self.skipTest("PYTHON-5491")
569567
if (
570568
"tailable" in class_name
571569
or "tailable" in description

test/csot/deprecated-options.json

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6750,16 +6750,23 @@
67506750
}
67516751
}
67526752
},
6753+
{
6754+
"name": "createIndex",
6755+
"object": "collection",
6756+
"arguments": {
6757+
"keys": {
6758+
"x": 1
6759+
},
6760+
"timeoutMS": 100000,
6761+
"name": "x_1"
6762+
}
6763+
},
67536764
{
67546765
"name": "dropIndex",
67556766
"object": "collection",
67566767
"arguments": {
67576768
"timeoutMS": 100000,
67586769
"name": "x_1"
6759-
},
6760-
"expectError": {
6761-
"isClientError": false,
6762-
"isTimeoutError": false
67636770
}
67646771
}
67656772
]
@@ -6815,23 +6822,36 @@
68156822
]
68166823
}
68176824
},
6825+
{
6826+
"name": "createIndex",
6827+
"object": "collection",
6828+
"arguments": {
6829+
"keys": {
6830+
"x": 1
6831+
},
6832+
"timeoutMS": 100000,
6833+
"name": "x_1"
6834+
}
6835+
},
68186836
{
68196837
"name": "dropIndex",
68206838
"object": "collection",
68216839
"arguments": {
68226840
"timeoutMS": 100000,
68236841
"name": "x_1"
6824-
},
6825-
"expectError": {
6826-
"isClientError": false,
6827-
"isTimeoutError": false
68286842
}
68296843
}
68306844
],
68316845
"expectEvents": [
68326846
{
68336847
"client": "client",
68346848
"events": [
6849+
{
6850+
"commandStartedEvent": {
6851+
"commandName": "createIndexes",
6852+
"databaseName": "test"
6853+
}
6854+
},
68356855
{
68366856
"commandStartedEvent": {
68376857
"commandName": "dropIndexes",
@@ -6903,24 +6923,36 @@
69036923
]
69046924
}
69056925
},
6926+
{
6927+
"name": "createIndex",
6928+
"object": "collection",
6929+
"arguments": {
6930+
"keys": {
6931+
"x": 1
6932+
},
6933+
"name": "x_1"
6934+
}
6935+
},
69066936
{
69076937
"name": "dropIndex",
69086938
"object": "collection",
69096939
"arguments": {
69106940
"timeoutMS": 1000,
69116941
"maxTimeMS": 5000,
69126942
"name": "x_1"
6913-
},
6914-
"expectError": {
6915-
"isClientError": false,
6916-
"isTimeoutError": false
69176943
}
69186944
}
69196945
],
69206946
"expectEvents": [
69216947
{
69226948
"client": "client",
69236949
"events": [
6950+
{
6951+
"commandStartedEvent": {
6952+
"commandName": "createIndexes",
6953+
"databaseName": "test"
6954+
}
6955+
},
69246956
{
69256957
"commandStartedEvent": {
69266958
"commandName": "dropIndexes",
@@ -7003,6 +7035,17 @@
70037035
}
70047036
}
70057037
},
7038+
{
7039+
"name": "createIndex",
7040+
"object": "collection",
7041+
"arguments": {
7042+
"keys": {
7043+
"x": 1
7044+
},
7045+
"name": "x_1",
7046+
"timeoutMS": 100000
7047+
}
7048+
},
70067049
{
70077050
"name": "dropIndexes",
70087051
"object": "collection",

test/csot/global-timeoutMS.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5621,22 +5621,34 @@
56215621
}
56225622
}
56235623
},
5624+
{
5625+
"name": "createIndex",
5626+
"object": "collection",
5627+
"arguments": {
5628+
"keys": {
5629+
"x": 1
5630+
},
5631+
"name": "x_1"
5632+
}
5633+
},
56245634
{
56255635
"name": "dropIndex",
56265636
"object": "collection",
56275637
"arguments": {
56285638
"name": "x_1"
5629-
},
5630-
"expectError": {
5631-
"isClientError": false,
5632-
"isTimeoutError": false
56335639
}
56345640
}
56355641
],
56365642
"expectEvents": [
56375643
{
56385644
"client": "client",
56395645
"events": [
5646+
{
5647+
"commandStartedEvent": {
5648+
"commandName": "createIndexes",
5649+
"databaseName": "test"
5650+
}
5651+
},
56405652
{
56415653
"commandStartedEvent": {
56425654
"commandName": "dropIndexes",

0 commit comments

Comments
 (0)