|
130 | 130 | from pymongo.server_selectors import Selection, writable_server_selector
|
131 | 131 | from pymongo.server_type import SERVER_TYPE
|
132 | 132 | from pymongo.topology_description import TopologyDescription
|
133 |
| -from pymongo.typings import ClusterTime, _Address |
| 133 | +from pymongo.typings import _Address |
134 | 134 | from pymongo.write_concern import WriteConcern
|
135 | 135 |
|
136 | 136 | JSON_OPTS = json_util.JSONOptions(tz_aware=False)
|
@@ -432,7 +432,7 @@ def __init__(self, test_class):
|
432 | 432 | self._listeners: Dict[str, EventListenerUtil] = {}
|
433 | 433 | self._session_lsids: Dict[str, Mapping[str, Any]] = {}
|
434 | 434 | self.test: UnifiedSpecTestMixinV1 = test_class
|
435 |
| - self._cluster_time: Optional[ClusterTime] = None |
| 435 | + self._cluster_time: Mapping[str, Any] = {} |
436 | 436 |
|
437 | 437 | def __contains__(self, item):
|
438 | 438 | return item in self._entities
|
@@ -625,9 +625,9 @@ def get_lsid_for_session(self, session_name):
|
625 | 625 | # session has been closed.
|
626 | 626 | return self._session_lsids[session_name]
|
627 | 627 |
|
628 |
| - def advance_cluster_times(self): |
| 628 | + def advance_cluster_times(self) -> None: |
629 | 629 | """Manually synchronize entities when desired"""
|
630 |
| - if self._cluster_time is None: |
| 630 | + if not self._cluster_time: |
631 | 631 | self._cluster_time = self.test.client.admin.command("ping").get("$clusterTime")
|
632 | 632 | for entity in self._entities:
|
633 | 633 | if isinstance(entity, ClientSession):
|
|
0 commit comments