diff --git a/src/test/java/net/snowflake/client/jdbc/SnowflakeDriverIT.java b/src/test/java/net/snowflake/client/jdbc/SnowflakeDriverIT.java index 8481ca822d..c6df4ca9b9 100644 --- a/src/test/java/net/snowflake/client/jdbc/SnowflakeDriverIT.java +++ b/src/test/java/net/snowflake/client/jdbc/SnowflakeDriverIT.java @@ -2736,6 +2736,7 @@ public void testPutGetToUnencryptedStage() throws Throwable { accountName = "gcpaccount"; SnowflakeUtil.systemSetEnv("SNOWFLAKE_GCS_FORCE_VIRTUAL_STYLE_DOMAINS", "true"); } + String stageName = "testPutGet_unencstage_" + SnowflakeUtil.randomAlphaNumeric(10); try (Connection connection = getConnection(accountName); Statement statement = connection.createStatement()) { try { @@ -2748,18 +2749,18 @@ public void testPutGetToUnencryptedStage() throws Throwable { statement.execute("alter session set ENABLE_GCP_PUT_EXCEPTION_FOR_OLD_DRIVERS=false"); statement.execute( - "CREATE OR REPLACE STAGE testPutGet_unencstage encryption=(TYPE='SNOWFLAKE_SSE')"); + "CREATE OR REPLACE STAGE " + stageName + " encryption=(TYPE='SNOWFLAKE_SSE')"); assertTrue( - statement.execute("PUT file://" + sourceFilePath + " @testPutGet_unencstage"), + statement.execute("PUT file://" + sourceFilePath + " @" + stageName), "Failed to put a file"); - findFile(statement, "ls @testPutGet_unencstage/"); + findFile(statement, "ls @" + stageName + "/"); // download the file we just uploaded to stage assertTrue( statement.execute( - "GET @testPutGet_unencstage 'file://" + destFolderCanonicalPath + "' parallel=8"), + "GET @" + stageName + " 'file://" + destFolderCanonicalPath + "' parallel=8"), "Failed to get a file"); // Make sure that the downloaded file exists, it should be gzip compressed @@ -2775,7 +2776,7 @@ public void testPutGetToUnencryptedStage() throws Throwable { File unzipped = new File(destFolderCanonicalPathWithSeparator + TEST_DATA_FILE); assertEquals(original.length(), unzipped.length()); } finally { - statement.execute("DROP STAGE IF EXISTS testPutGet_unencstage"); + statement.execute("DROP STAGE IF EXISTS " + stageName); } } finally { SnowflakeUtil.systemSetEnv("SNOWFLAKE_GCS_FORCE_VIRTUAL_STYLE_DOMAINS", "false");