Skip to content

Commit 178a537

Browse files
committed
Only advance ClientSession cluster time is admin ping returns a cluster_time
1 parent 8bc865b commit 178a537

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/unified_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ def advance_cluster_times(self) -> None:
630630
if not self._cluster_time:
631631
self._cluster_time = self.test.client.admin.command("ping").get("$clusterTime")
632632
for entity in self._entities.values():
633-
if isinstance(entity, ClientSession):
633+
if isinstance(entity, ClientSession) and self._cluster_time:
634634
entity.advance_cluster_time(self._cluster_time)
635635

636636

0 commit comments

Comments
 (0)