PYTHON-5208 Add spec test for wait queue timeout errors do not clear the pool#2199
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.
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.
| 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.
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.
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.
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