-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-5208 Add spec test for wait queue timeout errors do not clear the pool #2199
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
Conversation
self._cluster_time = (await self.client.admin.command("ping")).get("$clusterTime") | ||
await self.entity_map.advance_cluster_times() | ||
self._cluster_time = self.client._topology.max_cluster_time() | ||
await self.entity_map.advance_cluster_times(self._cluster_time) |
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.
I refactored this to remove the "ping" command because it was causing problems with the failpoint for this new test. We can get the clusterTime via self.client._topology.max_cluster_time()
instead.
@@ -1443,11 +1440,12 @@ async def _run_scenario(self, spec, uri=None): | |||
await self.entity_map.create_entities_from_spec( | |||
self.TEST_SPEC.get("createEntities", []), uri=uri | |||
) | |||
self._cluster_time = None |
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.
nit: Do we need to store this at the class level at all, or can this be a fully local variable?
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.
Yes we need it because the spec says it's the clusterTime from directly after initialData is inserted.
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.
the test runner MUST advance the cluster time of any session entities created during the test using the cluster time collected from processing initialData. See MigrationConflict Errors on Sharded Clusters for more information.
PYTHON-5208 Add spec test for wait queue timeout errors do not clear the pool
Implementation of mongodb/specifications#1768