@@ -44,18 +44,17 @@ import org.apache.spark.scheduler.LiveListenerBus
4444import org .apache .spark .serializer .{JavaSerializer , KryoSerializer }
4545import org .apache .spark .shuffle .hash .HashShuffleManager
4646import org .apache .spark .storage .BlockManagerMessages .BlockManagerHeartbeat
47- import org .apache .spark .util .{ AkkaUtils , ByteBufferInputStream , SizeEstimator , Utils }
47+ import org .apache .spark .util ._
4848
4949
5050class BlockManagerSuite extends FunSuite with Matchers with BeforeAndAfter
51- with PrivateMethodTester {
51+ with PrivateMethodTester with ResetSystemProperties {
5252
5353 private val conf = new SparkConf (false )
5454 var store : BlockManager = null
5555 var store2 : BlockManager = null
5656 var actorSystem : ActorSystem = null
5757 var master : BlockManagerMaster = null
58- var oldArch : String = null
5958 conf.set(" spark.authenticate" , " false" )
6059 val securityMgr = new SecurityManager (conf)
6160 val mapOutputTracker = new MapOutputTrackerMaster (conf)
@@ -85,7 +84,7 @@ class BlockManagerSuite extends FunSuite with Matchers with BeforeAndAfter
8584 this .actorSystem = actorSystem
8685
8786 // Set the arch to 64-bit and compressedOops to true to get a deterministic test-case
88- oldArch = System .setProperty(" os.arch" , " amd64" )
87+ System .setProperty(" os.arch" , " amd64" )
8988 conf.set(" os.arch" , " amd64" )
9089 conf.set(" spark.test.useCompressedOops" , " true" )
9190 conf.set(" spark.driver.port" , boundPort.toString)
@@ -113,14 +112,6 @@ class BlockManagerSuite extends FunSuite with Matchers with BeforeAndAfter
113112 actorSystem.awaitTermination()
114113 actorSystem = null
115114 master = null
116-
117- if (oldArch != null ) {
118- conf.set(" os.arch" , oldArch)
119- } else {
120- System .clearProperty(" os.arch" )
121- }
122-
123- System .clearProperty(" spark.test.useCompressedOops" )
124115 }
125116
126117 test(" StorageLevel object caching" ) {
0 commit comments