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

mpetrov 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 e5265616ff4 IGNITE-27913 Fixed flaky MultipleSSLContextsTest (#12772)
e5265616ff4 is described below

commit e5265616ff47ea0f67bbdac88d89ed2a19226076
Author: Mikhail Petrov <[email protected]>
AuthorDate: Fri Feb 20 01:00:40 2026 +0300

    IGNITE-27913 Fixed flaky MultipleSSLContextsTest (#12772)
    
    Thank you for submitting the pull request to the Apache Ignite.
    
    In order to streamline the review of the contribution
    we ask you to ensure the following steps have been taken:
    
    ### The Contribution Checklist
    - [ ] There is a single JIRA ticket related to the pull request.
    - [ ] The web-link to the pull request is attached to the JIRA ticket.
    - [ ] The JIRA ticket has the _Patch Available_ state.
    - [ ] The pull request body describes changes that have been made.
    The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
    - [ ] The pull request title is treated as the final commit message.
    The following pattern must be used: `IGNITE-XXXX Change summary` where
    `XXXX` - number of JIRA issue.
    - [ ] A reviewer has been mentioned through the JIRA comments
    (see [the Maintainers
    
list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers))
    - [ ] The pull request has been checked by the Teamcity Bot and
    the `green visa` attached to the JIRA ticket (see [TC.Bot: Check
    PR](https://mtcga.gridgain.com/prs.html))
    
    ### Notes
    - [How to
    
Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
    - [Coding abbreviation
    
rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
    - [Coding
    
Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
    - [Apache Ignite Teamcity
    
Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
    
    If you need any help, please email [email protected] or ask anу
    advice on http://asf.slack.com _#ignite_ channel.
---
 .../apache/ignite/ssl/MultipleSSLContextsTest.java | 37 ++++++++++++----------
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git 
a/modules/core/src/test/java/org/apache/ignite/ssl/MultipleSSLContextsTest.java 
b/modules/core/src/test/java/org/apache/ignite/ssl/MultipleSSLContextsTest.java
index 20544387572..53de153133b 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/ssl/MultipleSSLContextsTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/ssl/MultipleSSLContextsTest.java
@@ -34,6 +34,7 @@ import org.apache.ignite.configuration.ClientConfiguration;
 import org.apache.ignite.configuration.ClientConnectorConfiguration;
 import org.apache.ignite.configuration.ConnectorConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Test;
@@ -43,6 +44,9 @@ import org.junit.Test;
  * trust stores. SSL for all three transports are enabled at the same time.
  */
 public class MultipleSSLContextsTest extends GridCommonAbstractTest {
+    /** */
+    private static final int SRV_NODES_CNT = 3;
+
     /** */
     private boolean clientMode = false;
 
@@ -102,15 +106,14 @@ public class MultipleSSLContextsTest extends 
GridCommonAbstractTest {
     }
 
     /**
-     * @param addr Address of a node to connect to.
+     * @param port Port to connect to.
      * @return {@link ClientConfiguration} that can be used to start a thin 
client.
      */
-    private ClientConfiguration clientConfiguration(String addr) {
-        ClientConfiguration clientCfg = new 
ClientConfiguration().setAddresses(addr);
-        clientCfg.setSslContextFactory(thinClientSSLFactory());
-        clientCfg.setSslMode(SslMode.REQUIRED);
-
-        return clientCfg;
+    private ClientConfiguration clientConfiguration(int port) {
+        return new ClientConfiguration()
+            .setAddresses("127.0.0.1:" + port)
+            .setSslContextFactory(thinClientSSLFactory())
+            .setSslMode(SslMode.REQUIRED);
     }
 
     /**
@@ -123,7 +126,8 @@ public class MultipleSSLContextsTest extends 
GridCommonAbstractTest {
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
         clientMode = false;
-        startGrids(3);
+
+        startGrids(SRV_NODES_CNT);
     }
 
     /**
@@ -171,14 +175,10 @@ public class MultipleSSLContextsTest extends 
GridCommonAbstractTest {
         }
     }
 
-    /**
-     * Checks that thin clients with SSL enabled can join the cluster and 
perform some work on it.
-     *
-     * @throws Exception If failed.
-     */
+    /** Checks that thin clients with SSL enabled can join the cluster and 
perform some work on it. */
     @Test
-    public void testThinClients() throws Exception {
-        int clientsNum = 3;
+    public void testThinClients() {
+        int clientsNum = SRV_NODES_CNT;
         int keysNum = 1000;
         String cacheName = "thinClientCache";
 
@@ -186,7 +186,7 @@ public class MultipleSSLContextsTest extends 
GridCommonAbstractTest {
 
         try {
             for (int i = 0; i < clientsNum; i++) {
-                IgniteClient client = 
Ignition.startClient(clientConfiguration("127.0.0.1:1080" + i));
+                IgniteClient client = connectIgniteClientTo(grid(i));
 
                 clients.add(client);
             }
@@ -239,4 +239,9 @@ public class MultipleSSLContextsTest extends 
GridCommonAbstractTest {
             assertEquals("Cache contains an unexpected value for a key=" + 
key, expVal, actVal);
         }
     }
+
+    /** */
+    private IgniteClient connectIgniteClientTo(IgniteEx ignite) {
+        return 
Ignition.startClient(clientConfiguration(ignite.context().clientListener().port()));
+    }
 }

Reply via email to