Copilot commented on code in PR #7081:
URL: https://github.com/apache/ignite-3/pull/7081#discussion_r2565056601


##########
modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcConnectionFailoverTest.java:
##########
@@ -82,6 +123,50 @@ void testConnectionFailover() throws SQLException {
         }
     }
 
+    /**
+     * Ensures that the connection to a previously stopped node will be 
restored after the specified time interval.
+     *
+     * <p>Note: this test relies on the internal implementation to ensure that 
the
+     *          JDBC connection property is correctly applied to the 
underlying client.
+     */
+    @Test
+    @Disabled("https://issues.apache.org/jira/browse/IGNITE-27188";)
+    void testConnectionRestoredAfterBackgroundReconnectInterval() throws 
Exception {
+        int nodesCount = 3;
+        cluster.startAndInit(nodesCount, new int[]{2});
+        int reconnectInterval = 300;
+        int timeout = reconnectInterval * 2;
+
+        try (Connection connection = getConnection(nodesCount, 
"backgroundReconnectInterval=" + reconnectInterval)) {
+            Awaitility.await().until(() -> channelsCount(connection), 
is(nodesCount));
+
+            cluster.stopNode(0);
+
+            assertThat(channelsCount(connection), is(nodesCount - 1));
+
+            cluster.startNode(0);
+
+            Thread.sleep(timeout);
+
+            assertThat(channelsCount(connection), is(nodesCount));
+        }
+
+        // No background reconnection is expected.
+        try (Connection connection = getConnection(nodesCount, 
"backgroundReconnectInterval=0")) {

Review Comment:
   The property name used here should be "reconnectInterval", not 
"backgroundReconnectInterval". The ConnectionPropertiesImpl defines the 
property as "reconnectInterval" (line 75 in ConnectionPropertiesImpl.java).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to