Skip to content

Commit b0b3ba4

Browse files
committed
PYTHON-2779 Fix topologies field in snapshot reads test (#657)
(cherry picked from commit 354c96a)
1 parent d9d8b12 commit b0b3ba4

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
@@ -662,6 +662,10 @@ def check_auth_with_sharding(self, func):
662662
func=func)
663663

664664
def is_topology_type(self, topologies):
665+
unknown = set(topologies) - {'single', 'replicaset', 'sharded',
666+
'sharded-replicaset', 'load-balanced'}
667+
if unknown:
668+
raise AssertionError('Unknown topologies: %r' % (unknown,))
665669
if self.load_balancer:
666670
if 'load-balanced' in topologies:
667671
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)