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

vpyatkov 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 58c38a28ffa IGNITE-28546 Fix flaky 
NodeSslConnectionMetricTest#testClientConnector (#13028)
58c38a28ffa is described below

commit 58c38a28ffadc566510db1fcabf1fb5092113687
Author: Vladislav Pyatkov <[email protected]>
AuthorDate: Wed Apr 15 12:09:28 2026 +0300

    IGNITE-28546 Fix flaky NodeSslConnectionMetricTest#testClientConnector 
(#13028)
---
 .../ignite/common/NodeSslConnectionMetricTest.java | 24 ++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git 
a/modules/clients/src/test/java/org/apache/ignite/common/NodeSslConnectionMetricTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/common/NodeSslConnectionMetricTest.java
index d91240911b3..a50d5f4083f 100644
--- 
a/modules/clients/src/test/java/org/apache/ignite/common/NodeSslConnectionMetricTest.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/common/NodeSslConnectionMetricTest.java
@@ -69,8 +69,14 @@ public class NodeSslConnectionMetricTest extends 
GridCommonAbstractTest {
     /** Cipher suite not supported by cluster nodes. */
     private static final String UNSUPPORTED_CIPHER_SUITE = 
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA256";
 
+    /** Local client host. */
+    private static final String LOCAL_CLIENT_HOST = "127.0.0.1";
+
+    /** Local client port. */
+    private static final String LOCAL_CLIENT_PORT = "10800";
+
     /** Local server address. */
-    private static final String LOCAL_CLIENT_ADDRESS = "127.0.0.1:10800";
+    private static final String LOCAL_CLIENT_ADDRESS = LOCAL_CLIENT_HOST + ":" 
+ LOCAL_CLIENT_PORT;
 
     /** Metric timeout. */
     private static final long TIMEOUT = 7_000;
@@ -252,7 +258,7 @@ public class NodeSslConnectionMetricTest extends 
GridCommonAbstractTest {
                 startClient(clientConfiguration("client", "trustboth", 
CIPHER_SUITE, "TLSv1.2")),
             ClientConnectionException.class);
 
-        assertContains(log, ex.getMessage(), LOCAL_CLIENT_ADDRESS);
+        assertLocalClientAddressPresent(ex.getMessage());
 
         checkSslCommunicationMetrics(reg, 2, 0, 1);
 
@@ -262,7 +268,7 @@ public class NodeSslConnectionMetricTest extends 
GridCommonAbstractTest {
             ClientConnectionException.class
         );
 
-        assertContains(log, ex.getMessage(), LOCAL_CLIENT_ADDRESS);
+        assertLocalClientAddressPresent(ex.getMessage());
 
         checkSslCommunicationMetrics(reg, 3, 0, 2);
 
@@ -272,7 +278,7 @@ public class NodeSslConnectionMetricTest extends 
GridCommonAbstractTest {
             ClientConnectionException.class
         );
 
-        assertContains(log, ex.getMessage(), LOCAL_CLIENT_ADDRESS);
+        assertLocalClientAddressPresent(ex.getMessage());
 
         checkSslCommunicationMetrics(reg, 4, 0, 3);
     }
@@ -396,6 +402,16 @@ public class NodeSslConnectionMetricTest extends 
GridCommonAbstractTest {
                 waitForCondition(() -> expected <= supplier.get(), TIMEOUT));
     }
 
+    /**
+     * Checks that local client host and port are present in the message 
regardless of address rendering format.
+     *
+     * @param msg Exception message.
+     */
+    private void assertLocalClientAddressPresent(String msg) {
+        assertContains(log, msg, LOCAL_CLIENT_HOST);
+        assertContains(log, msg, LOCAL_CLIENT_PORT);
+    }
+
     /** Creates {@link SslContextFactory} with specified options. */
     private SslContextFactory sslContextFactory(String keyStore, String 
trustStore, String cipherSuite, String protocol) {
         SslContextFactory res = (SslContextFactory)sslTrustedFactory(keyStore, 
trustStore);

Reply via email to