From 50eccb04a46a49551bdf64b8e05e2e79ecd10aa7 Mon Sep 17 00:00:00 2001 From: cmgyqjj Date: Mon, 23 Sep 2024 17:03:30 +0800 Subject: [PATCH] feature_Support_reconnect_backoff_interface --- .../test/java/com/crossoverjie/cim/client/sdk/ClientTest.java | 3 +++ 1 file changed, 3 insertions(+) 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();