Skip to content

PYTHON-2729 PYTHON-2721 PYTHON-2730 Make 5.0 tests green #626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/command_monitoring/find.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down
4 changes: 4 additions & 0 deletions test/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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({})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"runOnRequirements": [
{
"minServerVersion": "3.1",
"maxServerVersion": "4.9.0",
"topologies": [
"single",
"replicaset"
Expand Down