SPARK-968, added sc finalize code to avoid akka rebinding to the same port

This commit is contained in:
wangda.tan 2013-12-09 09:38:58 +08:00
parent 850c4b709a
commit ee68a85cff

View file

@ -85,5 +85,12 @@ class JobProgressListenerSuite extends FunSuite {
listener.onTaskEnd(new SparkListenerTaskEnd(
new ShuffleMapTask(0, null, null, 0, null), Success, taskInfo, taskMetrics))
assert(listener.executorIdToSummary.getOrElse("exe-2", fail()).shuffleRead == 1000)
// do finalize
sc.stop()
// To avoid Akka rebinding to the same port, since it doesn't unbind immediately on shutdown
System.clearProperty("spark.driver.port")
System.clearProperty("spark.hostPort")
}
}