This is an automated email from the ASF dual-hosted git repository.
tkalkirill pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 0a15b6f9e85 IGNITE-28584 Fix flaky
TooManyOpenFilesTcpCommunicationSpiTest#testTooManyOpenFilesErr (#13054)
0a15b6f9e85 is described below
commit 0a15b6f9e859a10970711a0d48bce59eaec07070
Author: Kirill Tkalenko <[email protected]>
AuthorDate: Tue Apr 21 23:02:59 2026 +0300
IGNITE-28584 Fix flaky
TooManyOpenFilesTcpCommunicationSpiTest#testTooManyOpenFilesErr (#13054)
---
.../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));
+ }
}