From 3285d12559cd9b1489cbc98bb6b6fbb06aa6dfd9 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Fri, 21 May 2021 15:44:48 -0700 Subject: [PATCH 1/3] PYTHON-2729 Update explain response format parsing for 5.0 --- test/test_collection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_collection.py b/test/test_collection.py index 673816025a..424e25e4a8 100644 --- a/test/test_collection.py +++ b/test/test_collection.py @@ -579,6 +579,9 @@ def get_plan_stage(self, root, stage): stage = self.get_plan_stage(i, stage) if stage: return stage + elif "queryPlan" in root: + # queryPlan (and slotBasedPlan) are new in 5.0. + return self.get_plan_stage(root["queryPlan"], stage) elif "shards" in root: for i in root['shards']: stage = self.get_plan_stage(i['winningPlan'], stage) From 5e20a38db6e5371953209e46c0c6319711508932 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Fri, 21 May 2021 15:47:11 -0700 Subject: [PATCH 2/3] PYTHON-2721 Temporarily skip failing regex test on 5.0 --- test/test_collection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_collection.py b/test/test_collection.py index 424e25e4a8..538ebdc313 100644 --- a/test/test_collection.py +++ b/test/test_collection.py @@ -1175,6 +1175,7 @@ def test_fields_specifier_as_dict(self): self.assertTrue("x" not in db.test.find_one(projection={"x": 0})) self.assertTrue("mike" in db.test.find_one(projection={"x": 0})) + @client_context.require_version_max(4, 9, -1) # PYTHON-2721 def test_find_w_regex(self): db = self.db db.test.delete_many({}) From 0635307cce585b3d96586f96286af629297b16c4 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Fri, 21 May 2021 16:00:57 -0700 Subject: [PATCH 3/3] PYTHON-2730 Temporarily skip killCursors tests on 5.0 --- test/command_monitoring/find.json | 1 + test/unified-test-format/valid-pass/poc-command-monitoring.json | 1 + 2 files changed, 2 insertions(+) diff --git a/test/command_monitoring/find.json b/test/command_monitoring/find.json index 039c5fead1..608572ed42 100644 --- a/test/command_monitoring/find.json +++ b/test/command_monitoring/find.json @@ -415,6 +415,7 @@ { "description": "A successful find event with a getmore and the server kills the cursor", "ignore_if_server_version_less_than": "3.1", + "ignore_if_server_version_greater_than": "4.9.0", "ignore_if_topology_type": [ "sharded" ], diff --git a/test/unified-test-format/valid-pass/poc-command-monitoring.json b/test/unified-test-format/valid-pass/poc-command-monitoring.json index 499396e0ba..7484575066 100644 --- a/test/unified-test-format/valid-pass/poc-command-monitoring.json +++ b/test/unified-test-format/valid-pass/poc-command-monitoring.json @@ -61,6 +61,7 @@ "runOnRequirements": [ { "minServerVersion": "3.1", + "maxServerVersion": "4.9.0", "topologies": [ "single", "replicaset"