You've already forked spark-boilerplate
Update spark and gradle versions, fix deprecated features
This commit is contained in:
@ -22,20 +22,19 @@ class DriverTest extends AnyFunSuite with BeforeAndAfterAll {
|
||||
PropertyConfigurator.configure(properties)
|
||||
}
|
||||
|
||||
override def beforeAll: Unit = {
|
||||
override def beforeAll(): Unit = {
|
||||
setupLogger()
|
||||
LOG.info("Setting up spark session")
|
||||
spark = SparkSession.builder().appName(JOB_NAME).master("local[*]").getOrCreate()
|
||||
}
|
||||
|
||||
override def afterAll(): Unit = {
|
||||
LOG.info("Closing spark session")
|
||||
spark.close()
|
||||
}
|
||||
|
||||
test("Check if spark session is working") {
|
||||
LOG.info("Testing spark job")
|
||||
assertResult("hello")(spark.sql("SELECT 'hello'").collect().head.get(0))
|
||||
}
|
||||
|
||||
override def afterAll: Unit = {
|
||||
LOG.info("Closing spark session")
|
||||
spark.close()
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user