Merge pull request #12475 from anuragkumawat/JAVA-12627
JAVA-12627 Fix DatasetUnitTest in apache-spark module
This commit is contained in:
commit
193c7f82a6
|
@ -8,6 +8,8 @@ import java.util.List;
|
||||||
|
|
||||||
import org.apache.spark.sql.Dataset;
|
import org.apache.spark.sql.Dataset;
|
||||||
import org.apache.spark.sql.Row;
|
import org.apache.spark.sql.Row;
|
||||||
|
import org.apache.spark.sql.SparkSession;
|
||||||
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
class CustomerToDataFrameConverterAppUnitTest {
|
class CustomerToDataFrameConverterAppUnitTest {
|
||||||
|
@ -59,4 +61,9 @@ class CustomerToDataFrameConverterAppUnitTest {
|
||||||
assertEquals( "Male", row2.getAs("gender"));
|
assertEquals( "Male", row2.getAs("gender"));
|
||||||
assertEquals( 1200, (int)row2.getAs("transaction_amount"));
|
assertEquals( 1200, (int)row2.getAs("transaction_amount"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterEach
|
||||||
|
public void cleanup() {
|
||||||
|
SparkSession.getActiveSession().get().close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue