Fix DatasetUnitTest in apache-spark module
@@ -8,6 +8,8 @@ import java.util.List;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
+import org.apache.spark.sql.SparkSession;
+import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
class CustomerToDataFrameConverterAppUnitTest {
@@ -59,4 +61,9 @@ class CustomerToDataFrameConverterAppUnitTest {
assertEquals( "Male", row2.getAs("gender"));
assertEquals( 1200, (int)row2.getAs("transaction_amount"));
}
+
+ @AfterEach
+ public void cleanup() {
+ SparkSession.getActiveSession().get().close();
+ }
}
