Update spark and gradle versions, fix deprecated features

This commit is contained in:
2023-03-16 12:32:45 +01:00
parent fac2f6661e
commit 178f778f9c
7 changed files with 196 additions and 133 deletions

View File

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