From e5c23c00b19c1e60979a133a3eac7fe735d48c61 Mon Sep 17 00:00:00 2001 From: "v-susanh@microsoft.com" Date: Wed, 6 Sep 2023 13:55:47 -0700 Subject: [PATCH 1/2] fix tests for encrypt --- .../com/microsoft/sqlserver/jdbc/AlwaysEncrypted/AESetup.java | 2 +- src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/microsoft/sqlserver/jdbc/AlwaysEncrypted/AESetup.java b/src/test/java/com/microsoft/sqlserver/jdbc/AlwaysEncrypted/AESetup.java index 06a259586..541f2da16 100644 --- a/src/test/java/com/microsoft/sqlserver/jdbc/AlwaysEncrypted/AESetup.java +++ b/src/test/java/com/microsoft/sqlserver/jdbc/AlwaysEncrypted/AESetup.java @@ -191,7 +191,7 @@ static void setAEConnectionString(String serverName, String url, String protocol } // TODO: update AE test servers to support - AETestConnectionString += ";trustServerCertificate=true;"; + AETestConnectionString += ";encrypt=false;trustServerCertificate=true;"; } @BeforeAll diff --git a/src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java b/src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java index 5a032c59c..95ed8fa58 100644 --- a/src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java +++ b/src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java @@ -86,7 +86,7 @@ public void fipsPropertyTest() throws Exception { props.remove(Constants.ENCRYPT); props.remove(Constants.TRUST_SERVER_CERTIFICATE); - try (Connection con = PrepUtil.getConnection(connectionString, props)) { + try (Connection con = PrepUtil.getConnection(connectionString + "encrypt=false", props)) { Assertions.assertTrue(!StringUtils.isEmpty(con.getSchema())); } catch (Exception e) { fail(TestResource.getResource("R_unexpectedErrorMessage") + e.getMessage()); From b3e5cacefd467112b64b3fdd2c56b225c4926df1 Mon Sep 17 00:00:00 2001 From: lilgreenbird Date: Mon, 11 Sep 2023 16:04:17 -0700 Subject: [PATCH 2/2] Update src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java Co-authored-by: Jeffery Wasty --- src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java b/src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java index 95ed8fa58..10853f2f6 100644 --- a/src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java +++ b/src/test/java/com/microsoft/sqlserver/jdbc/fips/FipsTest.java @@ -86,7 +86,7 @@ public void fipsPropertyTest() throws Exception { props.remove(Constants.ENCRYPT); props.remove(Constants.TRUST_SERVER_CERTIFICATE); - try (Connection con = PrepUtil.getConnection(connectionString + "encrypt=false", props)) { + try (Connection con = PrepUtil.getConnection(connectionString + ";encrypt=false", props)) { Assertions.assertTrue(!StringUtils.isEmpty(con.getSchema())); } catch (Exception e) { fail(TestResource.getResource("R_unexpectedErrorMessage") + e.getMessage());