xtern commented on code in PR #7007: URL: https://github.com/apache/ignite-3/pull/7007#discussion_r2544884634
########## modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcConnectionFailoverTest.java: ########## @@ -0,0 +1,199 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.jdbc; + +import static org.apache.ignite.internal.testframework.IgniteTestUtils.assertThrows; +import static org.awaitility.Awaitility.await; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.time.Duration; +import java.util.stream.Collectors; +import java.util.stream.IntStream; +import org.apache.ignite.internal.ClusterPerTestIntegrationTest; +import org.apache.ignite.internal.jdbc.JdbcConnection; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Basic test scenarios with JDBC connection failover. + */ +public class ItJdbcConnectionFailoverTest extends ClusterPerTestIntegrationTest { + private static final int BASE_CLIENT_PORT = 10800; + + @Override + protected int initialNodes() { + return 0; + } + + /** + * Ensures that the client establishes connections to multiple nodes. + */ + @Test + void testMultipleConnectionEstablishment() throws SQLException { + int nodesCount = 2; + + cluster.startAndInit(nodesCount, new int[]{0}); + + try (Connection connection = getConnection(nodesCount)) { + await().timeout(Duration.ofSeconds(5)) + .until(() -> channelsCount(connection), is(nodesCount)); Review Comment: I had the same thoughts – the test has been removed. P.S. I originally added it based on what I saw in AI2. -- 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]
