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/test_collection.py b/test/test_collection.py index 673816025a..538ebdc313 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) @@ -1172,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({}) 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"