Skip to content

Commit

Permalink
Change the session parameter to run tests as is before with old driver (
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-igarish authored Sep 5, 2023
1 parent 1e92087 commit d157bd5
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ public void testPutWithWildcardGCP() throws Throwable {
String destFolderCanonicalPathWithSeparator = destFolderCanonicalPath + File.separator;

try {
statement.execute("alter session set ENABLE_GCP_PUT_EXCEPTION_FOR_OLD_DRIVERS=false");
statement.execute("CREATE OR REPLACE STAGE wildcard_stage");
assertTrue(
"Failed to put a file",
Expand Down Expand Up @@ -873,6 +874,8 @@ public void testPutGetLargeFileGCP() throws Throwable {
copyContentFrom(largeTempFile2, largeTempFile);
}

statement.execute("alter session set ENABLE_GCP_PUT_EXCEPTION_FOR_OLD_DRIVERS=false");

// create a stage to put the file in
statement.execute("CREATE OR REPLACE STAGE largefile_stage");
assertTrue(
Expand Down Expand Up @@ -952,6 +955,8 @@ public void testPutOverwrite() throws Throwable {

statement = connection.createStatement();

statement.execute("alter session set ENABLE_GCP_PUT_EXCEPTION_FOR_OLD_DRIVERS=false");

// create a stage to put the file in
statement.execute("CREATE OR REPLACE STAGE testing_stage");
assertTrue(
Expand Down Expand Up @@ -1011,6 +1016,7 @@ public void testPut() throws Throwable {
// load file test
// create a unique data file name by using current timestamp in millis
try {
statement.execute("alter session set ENABLE_GCP_PUT_EXCEPTION_FOR_OLD_DRIVERS=false");
// test external table load
statement.execute("CREATE OR REPLACE TABLE testLoadToLocalFS(a number)");

Expand Down Expand Up @@ -2957,6 +2963,7 @@ public void testPutGet() throws Throwable {
String destFolderCanonicalPathWithSeparator = destFolderCanonicalPath + File.separator;

try {
statement.execute("alter session set ENABLE_GCP_PUT_EXCEPTION_FOR_OLD_DRIVERS=false");
statement.execute("CREATE OR REPLACE STAGE testPutGet_stage");

assertTrue(
Expand Down Expand Up @@ -3020,6 +3027,7 @@ public void testPutGetToUnencryptedStage() throws Throwable {

try {
statement.execute("alter session set ENABLE_UNENCRYPTED_INTERNAL_STAGES=true");
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')");

Expand Down

0 comments on commit d157bd5

Please sign in to comment.