Merge pull request #12475 from anuragkumawat/JAVA-12627

JAVA-12627 Fix DatasetUnitTest in apache-spark module
This commit is contained in:
kwoyke 2022-07-12 09:27:28 +02:00 committed by GitHub
commit 193c7f82a6
1 changed files with 7 additions and 0 deletions

View File

@ -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();
}
}