From 818e00349f3f002a85514243c5885c04637a5fd0 Mon Sep 17 00:00:00 2001 From: gitRasheed <99349713+gitRasheed@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:44:49 +0000 Subject: [PATCH] test(spark): clear the stopped session when the Kryo write test ends Spark clears its active and default sessions from a listener after stop, so a test class that started right away on the Spark 4.2 suite reused the stopped session and failed with a NullPointerException from its scheduler. Signed-off-by: gitRasheed <99349713+gitRasheed@users.noreply.github.com> --- .../src/test/java/dev/vortex/spark/VortexKryoWriteTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/vortex-spark/common/src/test/java/dev/vortex/spark/VortexKryoWriteTest.java b/java/vortex-spark/common/src/test/java/dev/vortex/spark/VortexKryoWriteTest.java index 808916aeaae..723cf85878c 100644 --- a/java/vortex-spark/common/src/test/java/dev/vortex/spark/VortexKryoWriteTest.java +++ b/java/vortex-spark/common/src/test/java/dev/vortex/spark/VortexKryoWriteTest.java @@ -55,6 +55,10 @@ public void setUp() { public void tearDown() { if (spark != null) { spark.stop(); + // Spark clears these from a listener after stop, so a test class that starts right away could reuse + // the stopped session. + SparkSession.clearActiveSession(); + SparkSession.clearDefaultSession(); } }