You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fluss.apache.org by le...@apache.org on 2026/10/03 05:46:14 UTC

(fluss) branch main updated: [test] Stabilize Netty client disconnection test (#4344)

This is an automated email from the ASF dual-hosted git repository.

leekeiabstraction pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss.git


The following commit(s) were added to refs/heads/main by this push:
     new a234bd683a [test] Stabilize Netty client disconnection test (#4344)
a234bd683a is described below

commit a234bd683aa87410a28dd4b723ebca747b27b1ea
Author: litiliu <38...@users.noreply.github.com>
AuthorDate: Sat Oct 3 13:46:09 2026 +0800

    [test] Stabilize Netty client disconnection test (#4344)
---
 .../test/java/org/apache/fluss/rpc/netty/client/NettyClientTest.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fluss-rpc/src/test/java/org/apache/fluss/rpc/netty/client/NettyClientTest.java b/fluss-rpc/src/test/java/org/apache/fluss/rpc/netty/client/NettyClientTest.java
index 329f5d2f28..380158f27f 100644
--- a/fluss-rpc/src/test/java/org/apache/fluss/rpc/netty/client/NettyClientTest.java
+++ b/fluss-rpc/src/test/java/org/apache/fluss/rpc/netty/client/NettyClientTest.java
@@ -43,6 +43,7 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
 import java.net.ConnectException;
+import java.time.Duration;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -52,6 +53,7 @@ import java.util.Set;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutionException;
 
+import static org.apache.fluss.testutils.common.CommonTestUtils.retry;
 import static org.apache.fluss.utils.NetUtils.getAvailablePort;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -160,7 +162,7 @@ final class NettyClientTest {
                 .rootCause()
                 .isInstanceOf(ConnectException.class)
                 .hasMessageContaining("Connection refused");
-        assertThat(nettyClient.connections().size()).isEqualTo(0);
+        retry(Duration.ofSeconds(10), () -> assertThat(nettyClient.connections()).isEmpty());
 
         // restart the netty server.
         buildNettyServer(1);