Skip to content

Commit 0dc9461

Browse files
committed
[SPARK-52094][FOLLOWUP] Fix the test case to respect SPARK_REMOTE env variable
### What changes were proposed in this pull request? This is a follow-up of the following to fix the test case to respect `SPARK_REMOTE` env variable. - #139 ### Why are the changes needed? To recover linux CI. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #142 from dongjoon-hyun/SPARK-52094-2. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 2be8d4d commit 0dc9461

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/SparkConnectTests/SparkSessionTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ struct SparkSessionTests {
5454
func sessionID() async throws {
5555
let spark1 = try await SparkSession.builder.getOrCreate()
5656
await spark1.stop()
57-
let remote = "sc://localhost/;session_id=\(spark1.sessionID)"
58-
let spark2 = try await SparkSession.builder.remote(remote).getOrCreate()
57+
let remote = ProcessInfo.processInfo.environment["SPARK_REMOTE"] ?? "sc://localhost"
58+
let spark2 = try await SparkSession.builder.remote("\(remote)/;session_id=\(spark1.sessionID)").getOrCreate()
5959
await spark2.stop()
6060
#expect(spark1.sessionID == spark2.sessionID)
6161
#expect(spark1 == spark2)

0 commit comments

Comments
 (0)