@@ -20,7 +20,7 @@ package org.apache.spark.deploy
2020import scala .collection .JavaConverters ._
2121
2222import org .apache .spark .{SecurityManager , SparkConf , SparkFunSuite }
23- import org .apache .spark .internal .config .SHUFFLE_SERVICE_ENABLED
23+ import org .apache .spark .internal .config .{ SHUFFLE_SERVICE_DB_ENABLED , SHUFFLE_SERVICE_ENABLED }
2424import org .apache .spark .util .Utils
2525
2626class ExternalShuffleServiceMetricsSuite extends SparkFunSuite {
@@ -32,6 +32,7 @@ class ExternalShuffleServiceMetricsSuite extends SparkFunSuite {
3232 super .beforeAll()
3333 sparkConf = new SparkConf ()
3434 sparkConf.set(SHUFFLE_SERVICE_ENABLED , true )
35+ sparkConf.set(SHUFFLE_SERVICE_DB_ENABLED , false )
3536 sparkConf.set(" spark.local.dir" , System .getProperty(" java.io.tmpdir" ))
3637 Utils .loadDefaultSparkProperties(sparkConf, null )
3738 val securityManager = new SecurityManager (sparkConf)
@@ -40,7 +41,10 @@ class ExternalShuffleServiceMetricsSuite extends SparkFunSuite {
4041 }
4142
4243 override def afterAll (): Unit = {
43- externalShuffleService.stop()
44+ if (externalShuffleService != null ) {
45+ externalShuffleService.stop()
46+ }
47+ super .afterAll()
4448 }
4549
4650 test(" SPARK-31646: metrics should be registered" ) {
0 commit comments