diff --git a/src/test/java/com/microsoft/sqlserver/jdbc/connection/ConnectionDriverTest.java b/src/test/java/com/microsoft/sqlserver/jdbc/connection/ConnectionDriverTest.java index 8fe4a914b..78703e45c 100644 --- a/src/test/java/com/microsoft/sqlserver/jdbc/connection/ConnectionDriverTest.java +++ b/src/test/java/com/microsoft/sqlserver/jdbc/connection/ConnectionDriverTest.java @@ -295,6 +295,7 @@ public void testNegativeTimeout() throws Exception { public void testDeadConnection() throws SQLException { assumeTrue(!DBConnection.isSqlAzure(DriverManager.getConnection(connectionString)), "Skipping test case on Azure SQL."); + connectionString += "connectRetryCount=0"; SQLServerConnection conn = (SQLServerConnection) DriverManager.getConnection(connectionString + ";responseBuffering=adaptive"); Statement stmt = null; diff --git a/src/test/java/com/microsoft/sqlserver/jdbc/connection/TimeoutTest.java b/src/test/java/com/microsoft/sqlserver/jdbc/connection/TimeoutTest.java index a596221ea..9ebdd8ba9 100644 --- a/src/test/java/com/microsoft/sqlserver/jdbc/connection/TimeoutTest.java +++ b/src/test/java/com/microsoft/sqlserver/jdbc/connection/TimeoutTest.java @@ -13,6 +13,7 @@ import java.sql.DriverManager; import java.sql.SQLException; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.platform.runner.JUnitPlatform; import org.junit.runner.RunWith; @@ -108,14 +109,16 @@ public void testQueryTimeout() throws Exception { } @Test + @Disabled public void testSocketTimeout() throws Exception { - // cancel connection resilience to test socketTimeout - connectionString += "connectRetryCount=0"; + SQLServerConnection conn = (SQLServerConnection) DriverManager.getConnection(connectionString); dropWaitForDelayProcedure(conn); createWaitForDelayPreocedure(conn); + // cancel connection resilience to test socketTimeout + connectionString += "connectRetryCount=0"; conn = (SQLServerConnection) DriverManager.getConnection(connectionString + ";socketTimeout=" + (waitForDelaySeconds * 1000 / 2) + ";"); try {