PYTHON-3988 Python Test Suite still uses legacy isMaster Command when… (#1395)
This commit is contained in:
parent
4fa6056e72
commit
015073d4c1
@ -307,7 +307,10 @@ class ClientContext:
|
||||
@property
|
||||
def hello(self):
|
||||
if not self._hello:
|
||||
self._hello = self.client.admin.command(HelloCompat.LEGACY_CMD)
|
||||
if self.serverless or self.load_balancer:
|
||||
self._hello = self.client.admin.command(HelloCompat.CMD)
|
||||
else:
|
||||
self._hello = self.client.admin.command(HelloCompat.LEGACY_CMD)
|
||||
return self._hello
|
||||
|
||||
def _connect(self, host, port, **kwargs):
|
||||
@ -317,7 +320,7 @@ class ClientContext:
|
||||
)
|
||||
try:
|
||||
try:
|
||||
client.admin.command(HelloCompat.LEGACY_CMD) # Can we connect?
|
||||
client.admin.command("ping") # Can we connect?
|
||||
except pymongo.errors.OperationFailure as exc:
|
||||
# SERVER-32063
|
||||
self.connection_attempts.append(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user