[HUDI-780] Migrate test cases to Junit 5 (#1504)
This commit is contained in:
@@ -29,9 +29,9 @@ import org.apache.spark.sql.SparkSession;
|
||||
import org.apache.spark.sql.types.DataTypes;
|
||||
import org.apache.spark.sql.types.StructField;
|
||||
import org.apache.spark.sql.types.StructType;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -39,21 +39,21 @@ import java.util.List;
|
||||
import static org.apache.spark.sql.types.DataTypes.IntegerType;
|
||||
import static org.apache.spark.sql.types.DataTypes.StringType;
|
||||
import static org.apache.spark.sql.types.DataTypes.createStructField;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class TestChainedTransformer {
|
||||
|
||||
private JavaSparkContext jsc;
|
||||
private SparkSession sparkSession;
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
jsc = UtilHelpers.buildSparkContext(this.getClass().getName() + "-hoodie", "local[2]");
|
||||
sparkSession = SparkSession.builder().config(jsc.getConf()).getOrCreate();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
public void tearDown() {
|
||||
jsc.stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user