File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
core/src/test/scala/org/apache/spark/util Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -486,16 +486,16 @@ class UtilsSuite extends SparkFunSuite with ResetSystemProperties with Logging {
486486
487487 // Test for using the util function to change our log levels.
488488 test(" log4j log level change" ) {
489+ val current = org.apache.log4j.Logger .getRootLogger().getLevel()
489490 try {
490491 Utils .setLogLevel(org.apache.log4j.Level .ALL )
491492 assert(log.isInfoEnabled())
492493 Utils .setLogLevel(org.apache.log4j.Level .ERROR )
493494 assert(! log.isInfoEnabled())
494495 assert(log.isErrorEnabled())
495496 } finally {
496- // Best effort at undoing changes this test made. Level should be synchronized with the
497- // log4j.properties file used for testing.
498- Utils .setLogLevel(org.apache.log4j.Level .INFO )
497+ // Best effort at undoing changes this test made.
498+ Utils .setLogLevel(current)
499499 }
500500 }
501501
You can’t perform that action at this time.
0 commit comments