PYTHON-2779 Fix topologies field in snapshot reads test (#657)

This commit is contained in:
Shane Harvey 2021-06-28 15:11:52 -07:00 committed by GitHub
parent a94504bde9
commit 354c96a414
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 5 deletions

View File

@ -673,6 +673,10 @@ class ClientContext(object):
func=func)
def is_topology_type(self, topologies):
unknown = set(topologies) - {'single', 'replicaset', 'sharded',
'sharded-replicaset', 'load-balanced'}
if unknown:
raise AssertionError('Unknown topologies: %r' % (unknown,))
if self.load_balancer:
if 'load-balanced' in topologies:
return True

View File

@ -4,9 +4,12 @@
"runOnRequirements": [
{
"minServerVersion": "3.6",
"maxServerVersion": "4.4.99",
"maxServerVersion": "4.4.99"
},
{
"minServerVersion": "3.6",
"topologies": [
"replicaset, sharded-replicaset"
"single"
]
}
],
@ -17,6 +20,11 @@
"observeEvents": [
"commandStartedEvent",
"commandFailedEvent"
],
"ignoreCommandMonitoringEvents": [
"findAndModify",
"insert",
"update"
]
}
},
@ -87,9 +95,7 @@
"$$exists": false
}
}
},
"commandName": "find",
"databaseName": "database0"
}
}
},
{