Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-954959: Don't create newSession when running test in SP #71

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ class AsyncJobSuite extends TestData with BeforeAndAfterEach {
super.beforeAll()
// create temporary stage to store the file
runQuery(s"CREATE TEMPORARY STAGE $tmpStageName", session)
runQuery(s"CREATE TEMPORARY STAGE $tmpStageName", newSession)
// Create temp target stage for writing DF to file test.
runQuery(s"CREATE TEMPORARY STAGE $targetStageName", session)
// upload the file to stage
uploadFileToStage(tmpStageName, testFileCsv, compress = false)
if (!isStoredProc(session)) {
// create temporary stage to store the file
runQuery(s"CREATE TEMPORARY STAGE $tmpStageName", newSession)
TestUtils.addDepsToClassPath(session, Some(tmpStageName))
// In stored procs mode, there is only one session
TestUtils.addDepsToClassPath(newSession, Some(tmpStageName))
Expand All @@ -45,7 +46,9 @@ class AsyncJobSuite extends TestData with BeforeAndAfterEach {
override def afterAll(): Unit = {
// drop the temporary stages
runQuery(s"DROP STAGE IF EXISTS $tmpStageName", session)
runQuery(s"DROP STAGE IF EXISTS $tmpStageName", newSession)
if (!isStoredProc(session)) {
runQuery(s"DROP STAGE IF EXISTS $tmpStageName", newSession)
}
dropTable(tableName)
dropTable(tableName1)
dropTable(tableName2)
Expand Down
Loading