diff --git a/cim-client-sdk/src/test/java/com/crossoverjie/cim/client/sdk/ClientTest.java b/cim-client-sdk/src/test/java/com/crossoverjie/cim/client/sdk/ClientTest.java index bc51afaf..11509998 100644 --- a/cim-client-sdk/src/test/java/com/crossoverjie/cim/client/sdk/ClientTest.java +++ b/cim-client-sdk/src/test/java/com/crossoverjie/cim/client/sdk/ClientTest.java @@ -224,11 +224,13 @@ public void testReconnect() throws Exception { .userName(zs) .userId(zsId) .build(); + var backoffStrategy = "com.crossoverjie.cim.client.sdk.io.backoff.RandomBackoff"; @Cleanup Client client1 = Client.builder() .auth(auth1) .routeUrl(routeUrl) + .backoffStrategy(backoffStrategy) .build(); TimeUnit.SECONDS.sleep(3); ClientState.State state = client1.getState(); @@ -242,6 +244,7 @@ public void testReconnect() throws Exception { .auth(auth2) .routeUrl(routeUrl) .messageListener((client, message) -> client2Receive.set(message)) + .backoffStrategy(backoffStrategy) .build(); TimeUnit.SECONDS.sleep(3); ClientState.State state2 = client2.getState();