Skip to content
Snippets Groups Projects
Commit 0f45347c authored by Matei Zaharia's avatar Matei Zaharia
Browse files

More unit test fixes

parent bce4089f
No related branches found
No related tags found
No related merge requests found
...@@ -81,6 +81,9 @@ class MapOutputTrackerSuite extends FunSuite with LocalSparkContext { ...@@ -81,6 +81,9 @@ class MapOutputTrackerSuite extends FunSuite with LocalSparkContext {
test("remote fetch") { test("remote fetch") {
val (actorSystem, boundPort) = AkkaUtils.createActorSystem("spark", "localhost", 0) val (actorSystem, boundPort) = AkkaUtils.createActorSystem("spark", "localhost", 0)
System.setProperty("spark.driver.port", boundPort.toString) // Will be cleared by LocalSparkContext
System.setProperty("spark.hostPort", "localhost:" + boundPort)
val masterTracker = new MapOutputTracker() val masterTracker = new MapOutputTracker()
masterTracker.trackerActor = actorSystem.actorOf( masterTracker.trackerActor = actorSystem.actorOf(
Props(new MapOutputTrackerActor(masterTracker)), "MapOutputTracker") Props(new MapOutputTrackerActor(masterTracker)), "MapOutputTracker")
......
...@@ -33,11 +33,10 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT ...@@ -33,11 +33,10 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT
val serializer = new KryoSerializer val serializer = new KryoSerializer
before { before {
val hostname = Utils.localHostName val (actorSystem, boundPort) = AkkaUtils.createActorSystem("test", "localhost", 0)
val (actorSystem, boundPort) = AkkaUtils.createActorSystem("test", hostname, 0)
this.actorSystem = actorSystem this.actorSystem = actorSystem
System.setProperty("spark.driver.port", boundPort.toString) System.setProperty("spark.driver.port", boundPort.toString)
System.setProperty("spark.hostPort", hostname + ":" + boundPort) System.setProperty("spark.hostPort", "localhost:" + boundPort)
master = new BlockManagerMaster( master = new BlockManagerMaster(
actorSystem.actorOf(Props(new spark.storage.BlockManagerMasterActor(true)))) actorSystem.actorOf(Props(new spark.storage.BlockManagerMasterActor(true))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment