From 31f6ec245e683c1c6aceab265496b09880e4f531 Mon Sep 17 00:00:00 2001 From: Adam Kolodziejczyk Date: Mon, 9 Dec 2024 11:20:51 +0100 Subject: [PATCH] code review changes --- ci/container/test_authentication.sh | 2 +- parent-pom.xml | 2 +- pom.xml | 4 ++-- .../java/net/snowflake/client/authentication/AuthTest.java | 6 ++++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ci/container/test_authentication.sh b/ci/container/test_authentication.sh index 884703be0..9a2eddf27 100755 --- a/ci/container/test_authentication.sh +++ b/ci/container/test_authentication.sh @@ -12,7 +12,7 @@ eval $(jq -r '.authtestparams | to_entries | map("export \(.key)=\(.value|tostri $MVNW_EXE -DjenkinsIT \ -Djava.io.tmpdir=$WORKSPACE \ -Djacoco.skip.instrument=true \ - -Dskip.ut=true \ + -Dskip.unitTests=true \ -DintegrationTestSuites=AuthenticationTestSuite \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ -Dnot-self-contained-jar \ diff --git a/parent-pom.xml b/parent-pom.xml index 37cc900c2..3d2b1b6b9 100644 --- a/parent-pom.xml +++ b/parent-pom.xml @@ -78,7 +78,7 @@ net/snowflake/client/jdbc/internal net.snowflake.client.jdbc.internal net_snowflake_client_jdbc_internal - false + false 2.0.13 5.1.4 UnitTestSuite diff --git a/pom.xml b/pom.xml index 9a2800127..f53cf4c51 100644 --- a/pom.xml +++ b/pom.xml @@ -1162,7 +1162,7 @@ maven-surefire-plugin - ${skip.ut} + ${skip.unitTests} --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED @@ -1215,7 +1215,7 @@ maven-surefire-plugin UnitTestSuite - ${skip.ut} + ${skip.unitTests} diff --git a/src/test/java/net/snowflake/client/authentication/AuthTest.java b/src/test/java/net/snowflake/client/authentication/AuthTest.java index dd528d64a..1fb9ddf07 100644 --- a/src/test/java/net/snowflake/client/authentication/AuthTest.java +++ b/src/test/java/net/snowflake/client/authentication/AuthTest.java @@ -13,6 +13,8 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; +import java.util.concurrent.TimeUnit; + import net.snowflake.client.core.SessionUtil; import net.snowflake.client.jdbc.SnowflakeConnectionV1; import net.snowflake.client.jdbc.SnowflakeSQLException; @@ -62,7 +64,7 @@ public void provideCredentials(String scenario, String login, String password) { ProcessBuilder processBuilder = new ProcessBuilder("node", provideBrowserCredentialsPath, scenario, login, password); Process process = processBuilder.start(); - process.waitFor(); + process.waitFor(15, TimeUnit.SECONDS); } catch (Exception e) { throw new RuntimeException(e); } @@ -74,7 +76,7 @@ public void cleanBrowserProcesses() { ProcessBuilder processBuilder = new ProcessBuilder("node", cleanBrowserProcessesPath); try { Process process = processBuilder.start(); - process.waitFor(); + process.waitFor(15, TimeUnit.SECONDS); } catch (InterruptedException | IOException e) { throw new RuntimeException(e); }