diff --git a/fluss-client/src/test/java/org/apache/fluss/client/admin/FlussAdminITCase.java b/fluss-client/src/test/java/org/apache/fluss/client/admin/FlussAdminITCase.java index 150b84e567..1eb5c37c48 100644 --- a/fluss-client/src/test/java/org/apache/fluss/client/admin/FlussAdminITCase.java +++ b/fluss-client/src/test/java/org/apache/fluss/client/admin/FlussAdminITCase.java @@ -1175,7 +1175,6 @@ void testKvSnapshotLeaseAfterCoordinatorServerRestart() throws Exception { assertThat(zkClient.getKvSnapshotLeaseMetadata(lease.leaseId())).isPresent(); restartCoordinatorServer(zkClient); - FLUSS_CLUSTER_EXTENSION.waitUntilAllGatewayHasSameMetadata(); lease.dropLease().get(); assertThat(zkClient.getKvSnapshotLeaseMetadata(lease.leaseId())).isNotPresent(); @@ -1188,6 +1187,10 @@ private void restartCoordinatorServer(ZooKeeperClient zkClient) throws Exception Duration.ofMinutes(1), "Coordinator server node still exists in ZooKeeper"); FLUSS_CLUSTER_EXTENSION.startCoordinatorServer(); + // The retryable gateway proxy refreshes metadata from a tablet server and retries only + // once, so wait until the tablet servers have learned the new coordinator address before + // issuing the next lease request; the client itself still holds the stale address. + FLUSS_CLUSTER_EXTENSION.waitUntilAllGatewayHasSameMetadata(); } @Test