Skip to content

Commit 354c96a

Browse files
authored
PYTHON-2779 Fix topologies field in snapshot reads test (mongodb#657)
1 parent a94504b commit 354c96a

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

test/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,10 @@ def check_auth_with_sharding(self, func):
673673
func=func)
674674

675675
def is_topology_type(self, topologies):
676+
unknown = set(topologies) - {'single', 'replicaset', 'sharded',
677+
'sharded-replicaset', 'load-balanced'}
678+
if unknown:
679+
raise AssertionError('Unknown topologies: %r' % (unknown,))
676680
if self.load_balancer:
677681
if 'load-balanced' in topologies:
678682
return True

test/sessions/unified/snapshot-sessions-not-supported-server-error.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
"runOnRequirements": [
55
{
66
"minServerVersion": "3.6",
7-
"maxServerVersion": "4.4.99",
7+
"maxServerVersion": "4.4.99"
8+
},
9+
{
10+
"minServerVersion": "3.6",
811
"topologies": [
9-
"replicaset, sharded-replicaset"
12+
"single"
1013
]
1114
}
1215
],
@@ -17,6 +20,11 @@
1720
"observeEvents": [
1821
"commandStartedEvent",
1922
"commandFailedEvent"
23+
],
24+
"ignoreCommandMonitoringEvents": [
25+
"findAndModify",
26+
"insert",
27+
"update"
2028
]
2129
}
2230
},
@@ -87,9 +95,7 @@
8795
"$$exists": false
8896
}
8997
}
90-
},
91-
"commandName": "find",
92-
"databaseName": "database0"
98+
}
9399
}
94100
},
95101
{

0 commit comments

Comments
 (0)