-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
PYTHON-4815 Migrate test_discovery_and_monitoring.py to async #1893
base: master
Are you sure you want to change the base?
Conversation
@@ -250,7 +250,7 @@ async def _check_server(self) -> ServerDescription: | |||
except (OperationFailure, NotPrimaryError) as exc: | |||
# Update max cluster time even when hello fails. | |||
details = cast(Mapping[str, Any], exc.details) | |||
self._topology.receive_cluster_time(details.get("$clusterTime")) | |||
await self._topology.receive_cluster_time(details.get("$clusterTime")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
_IS_SYNC = False | ||
|
||
# Location of JSON test specifications. | ||
SDAM_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "discovery_and_monitoring") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be updated to point to test/discovery_and_monitoring
instead of test/asynchronous/discovery_and_monitoring
.
else: | ||
raise AssertionError(f"Unknown when field {when}") | ||
|
||
topology.handle_error( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing an await
here.
description = phase.get("description", str(i)) | ||
with assertion_context(f"phase: {description}"): | ||
for response in phase.get("responses", []): | ||
got_hello(c, common.partition_node(response[0]), response[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing an await
here.
No description provided.