Skip to content

Commit f2133aa

Browse files
committed
Disable in Spark 3
1 parent d14b00c commit f2133aa

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Tests/SparkConnectTests/SparkSessionTests.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ struct SparkSessionTests {
6868
func closedSessionID() async throws {
6969
await SparkSession.builder.clear()
7070
let spark1 = try await SparkSession.builder.getOrCreate()
71-
let sessionID = spark1.sessionID
72-
await spark1.stop()
73-
let remote = ProcessInfo.processInfo.environment["SPARK_REMOTE"] ?? "sc://localhost"
74-
try await #require(throws: Error.self) {
75-
try await SparkSession.builder.remote("\(remote)/;session_id=\(sessionID)").getOrCreate()
71+
if await spark1.version >= "4.0.0" {
72+
let sessionID = spark1.sessionID
73+
await spark1.stop()
74+
let remote = ProcessInfo.processInfo.environment["SPARK_REMOTE"] ?? "sc://localhost"
75+
try await #require(throws: Error.self) {
76+
try await SparkSession.builder.remote("\(remote)/;session_id=\(sessionID)").getOrCreate()
77+
}
7678
}
7779
}
7880

0 commit comments

Comments
 (0)