Skip to content

Commit 2cb5ffb

Browse files
committed
tests change
1 parent b7d28f4 commit 2cb5ffb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

fluss-client/src/test/java/org/apache/fluss/client/metadata/MetadataUpdaterTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.apache.fluss.cluster.Cluster;
2121
import org.apache.fluss.cluster.ServerNode;
2222
import org.apache.fluss.cluster.ServerType;
23+
import org.apache.fluss.config.ConfigOptions;
2324
import org.apache.fluss.config.Configuration;
2425
import org.apache.fluss.exception.StaleMetadataException;
2526
import org.apache.fluss.rpc.RpcClient;
@@ -51,12 +52,14 @@ void testInitializeClusterWithRetries() throws Exception {
5152
Configuration configuration = new Configuration();
5253
RpcClient rpcClient =
5354
RpcClient.create(configuration, TestingClientMetricGroup.newInstance(), false);
55+
int times = configuration.getInt(ConfigOptions.CLIENT_METADATA_RETRY_TIMES);
56+
int interval = configuration.getInt(ConfigOptions.CLIENT_METADATA_RETRY_INTERVAL);
5457

5558
// retry lower than max retry count.
5659
AdminReadOnlyGateway gateway = new TestingAdminReadOnlyGateway(2);
5760
Cluster cluster =
5861
MetadataUpdater.tryToInitializeClusterWithRetries(
59-
rpcClient, CS_NODE, gateway, 3, 100);
62+
rpcClient, CS_NODE, gateway, times, interval);
6063
assertThat(cluster).isNotNull();
6164
assertThat(cluster.getCoordinatorServer()).isEqualTo(CS_NODE);
6265
assertThat(cluster.getAliveTabletServerList()).containsExactly(TS_NODE);
@@ -66,7 +69,7 @@ void testInitializeClusterWithRetries() throws Exception {
6669
assertThatThrownBy(
6770
() ->
6871
MetadataUpdater.tryToInitializeClusterWithRetries(
69-
rpcClient, CS_NODE, gateway2, 3, 100))
72+
rpcClient, CS_NODE, gateway2, times, interval))
7073
.isInstanceOf(StaleMetadataException.class)
7174
.hasMessageContaining("The metadata is stale.");
7275
}

0 commit comments

Comments
 (0)