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

tkalkirill pushed a commit to branch ignite-28584
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 5a9bc6070aafda16861cd0e44d4a677e0767c44c
Author: Kirill Tkalenko <[email protected]>
AuthorDate: Tue Apr 21 08:43:35 2026 +0300

    IGNITE-28584 wip
---
 .../TooManyOpenFilesTcpCommunicationSpiTest.java    | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git 
a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TooManyOpenFilesTcpCommunicationSpiTest.java
 
b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TooManyOpenFilesTcpCommunicationSpiTest.java
index f4165a71e70..9ab03d40120 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TooManyOpenFilesTcpCommunicationSpiTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TooManyOpenFilesTcpCommunicationSpiTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.spi.communication.tcp;
 
 import java.net.SocketException;
+import java.util.UUID;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cluster.ClusterState;
 import org.apache.ignite.cluster.ClusterTopologyException;
@@ -102,7 +103,9 @@ public class TooManyOpenFilesTcpCommunicationSpiTest 
extends GridCommonAbstractT
             nioSrvWrapper.socketChannelFactory(() -> {
                 throw new SocketException("Too many open files");
             });
-            connPool.forceCloseConnection(txNode.localNode().id());
+            // Sometimes we can get `org.apache.ignite.IgniteCheckedException: 
Too many open files` due to parallel
+            // connection creation, since the forceCloseConnection is for 
tests, then we can ignore the exception.
+            forceCloseConnectionSafe(connPool, txNode.localNode().id());
 
             cache.put(1, 2);
             cache.put(2, 3);
@@ -117,4 +120,20 @@ public class TooManyOpenFilesTcpCommunicationSpiTest 
extends GridCommonAbstractT
 
         assertTrue(waitForCondition(((IgniteKernal)stopNode)::isStopping, 
60_000));
     }
+
+    /** */
+    private static void forceCloseConnectionSafe(ConnectionClientPool 
connPool, UUID nodeId) throws Exception {
+        assertTrue(waitForCondition(() -> {
+            try {
+                connPool.forceCloseConnection(nodeId);
+
+                return true;
+            }
+            catch (Throwable t) {
+                log.error("Error occurred while attempting to force close 
connections for node: " + nodeId, t);
+
+                return false;
+            }
+        }, 10_000));
+    }
 }

Reply via email to