From 6cfa2008aec571e77d4f46e8dcb5d257ee5040cc Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 8 Aug 2025 16:30:02 -0500 Subject: [PATCH 1/3] PYTHON-5491 Skip non-idempotent dropIndex tests --- .evergreen/generated_configs/variants.yml | 16 ++++++++++++++++ .evergreen/scripts/generate_config.py | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index 4fb5a36250..a05cc61f05 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -535,6 +535,8 @@ buildvariants: display_name: "* MongoDB v4.2" run_on: - rhel87-small + expansions: + VERSION: "4.2" tags: [coverage_tag] - name: mongodb-v4.4 tasks: @@ -542,6 +544,8 @@ buildvariants: display_name: "* MongoDB v4.4" run_on: - rhel87-small + expansions: + VERSION: "4.4" tags: [coverage_tag] - name: mongodb-v5.0 tasks: @@ -549,6 +553,8 @@ buildvariants: display_name: "* MongoDB v5.0" run_on: - rhel87-small + expansions: + VERSION: "5.0" tags: [coverage_tag] - name: mongodb-v6.0 tasks: @@ -556,6 +562,8 @@ buildvariants: display_name: "* MongoDB v6.0" run_on: - rhel87-small + expansions: + VERSION: "6.0" tags: [coverage_tag] - name: mongodb-v7.0 tasks: @@ -563,6 +571,8 @@ buildvariants: display_name: "* MongoDB v7.0" run_on: - rhel87-small + expansions: + VERSION: "7.0" tags: [coverage_tag] - name: mongodb-v8.0 tasks: @@ -570,6 +580,8 @@ buildvariants: display_name: "* MongoDB v8.0" run_on: - rhel87-small + expansions: + VERSION: "8.0" tags: [coverage_tag] - name: mongodb-rapid tasks: @@ -577,6 +589,8 @@ buildvariants: display_name: "* MongoDB rapid" run_on: - rhel87-small + expansions: + VERSION: rapid tags: [coverage_tag] - name: mongodb-latest tasks: @@ -584,6 +598,8 @@ buildvariants: display_name: "* MongoDB latest" run_on: - rhel87-small + expansions: + VERSION: latest tags: [coverage_tag] # Stable api tests diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 2d160152f7..3a386be4f7 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -74,7 +74,11 @@ def create_server_version_variants() -> list[BuildVariant]: for version in ALL_VERSIONS: display_name = get_variant_name("* MongoDB", version=version) variant = create_variant( - [".server-version"], display_name, host=DEFAULT_HOST, tags=["coverage_tag"] + [".server-version"], + display_name, + version=version, + host=DEFAULT_HOST, + tags=["coverage_tag"], ) variants.append(variant) return variants From 7479e06e6ead476ccab95d28927458dec0f362b8 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 8 Aug 2025 16:35:35 -0500 Subject: [PATCH 2/3] skip tests --- test/asynchronous/unified_format.py | 2 ++ test/unified_format.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/asynchronous/unified_format.py b/test/asynchronous/unified_format.py index 964d2df96d..09bf7e83ea 100644 --- a/test/asynchronous/unified_format.py +++ b/test/asynchronous/unified_format.py @@ -564,6 +564,8 @@ def maybe_skip_test(self, spec): 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 diff --git a/test/unified_format.py b/test/unified_format.py index c21f29fe19..3496b2ad44 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -563,6 +563,8 @@ def maybe_skip_test(self, spec): 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 From 2dc321051283412fb15091db0115d1995b88dc1b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 8 Aug 2025 16:50:16 -0500 Subject: [PATCH 3/3] skip another test --- test/asynchronous/test_collection.py | 2 ++ test/test_collection.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/asynchronous/test_collection.py b/test/asynchronous/test_collection.py index cda8452d1c..6a85b63960 100644 --- a/test/asynchronous/test_collection.py +++ b/test/asynchronous/test_collection.py @@ -335,6 +335,8 @@ async def test_create_index(self): await db.test.create_index(["hello", ("world", DESCENDING)]) await db.test.create_index({"hello": 1}.items()) # type:ignore[arg-type] + # TODO: PYTHON-5491 - remove version max + @async_client_context.require_version_max(8, 0, -1) async def test_drop_index(self): db = self.db await db.test.drop_indexes() diff --git a/test/test_collection.py b/test/test_collection.py index ccace72bec..0dce88423b 100644 --- a/test/test_collection.py +++ b/test/test_collection.py @@ -333,6 +333,8 @@ def test_create_index(self): db.test.create_index(["hello", ("world", DESCENDING)]) db.test.create_index({"hello": 1}.items()) # type:ignore[arg-type] + # TODO: PYTHON-5491 - remove version max + @client_context.require_version_max(8, 0, -1) def test_drop_index(self): db = self.db db.test.drop_indexes()