[MINOR][CORE][TEST] Fix afterEach() in TastSetManagerSuite and TaskSchedulerImplSuite
## What changes were proposed in this pull request? In the `afterEach()` method of both `TastSetManagerSuite` and `TaskSchedulerImplSuite`, `super.afterEach()` shall be called at the end, because it shall stop the SparkContext. https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/93706/testReport/org.apache.spark.scheduler/TaskSchedulerImplSuite/_It_is_not_a_test_it_is_a_sbt_testing_SuiteSelector_/ The test failure is caused by the above reason, the newly added `barrierCoordinator` required `rpcEnv` which has been stopped before `TaskSchedulerImpl` doing cleanup. ## How was this patch tested? Existing tests. Author: Xingbo Jiang <xingbo.jiang@databricks.com> Closes #21908 from jiangxb1987/afterEach.
This commit is contained in:
parent
2c54aae1bc
commit
3695ba5773
|
@ -62,7 +62,6 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext with B
|
|||
}
|
||||
|
||||
override def afterEach(): Unit = {
|
||||
super.afterEach()
|
||||
if (taskScheduler != null) {
|
||||
taskScheduler.stop()
|
||||
taskScheduler = null
|
||||
|
@ -71,6 +70,7 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext with B
|
|||
dagScheduler.stop()
|
||||
dagScheduler = null
|
||||
}
|
||||
super.afterEach()
|
||||
}
|
||||
|
||||
def setupScheduler(confs: (String, String)*): TaskSchedulerImpl = {
|
||||
|
|
|
@ -178,12 +178,12 @@ class TaskSetManagerSuite extends SparkFunSuite with LocalSparkContext with Logg
|
|||
}
|
||||
|
||||
override def afterEach(): Unit = {
|
||||
super.afterEach()
|
||||
if (sched != null) {
|
||||
sched.dagScheduler.stop()
|
||||
sched.stop()
|
||||
sched = null
|
||||
}
|
||||
super.afterEach()
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue