MAPREDUCE-6815. Fix flaky TestKill.testKillTask(). Contributed by Haibo Chen
(cherry picked from commit 0cfd7ad21f
)
This commit is contained in:
parent
e6394e3a35
commit
69f66424b9
|
@ -259,6 +259,7 @@ public abstract class TaskImpl implements Task, EventHandler<TaskEvent> {
|
||||||
// d. TA processes TA_KILL event and sends T_ATTEMPT_KILLED to the task.
|
// d. TA processes TA_KILL event and sends T_ATTEMPT_KILLED to the task.
|
||||||
.addTransition(TaskStateInternal.KILLED, TaskStateInternal.KILLED,
|
.addTransition(TaskStateInternal.KILLED, TaskStateInternal.KILLED,
|
||||||
EnumSet.of(TaskEventType.T_KILL,
|
EnumSet.of(TaskEventType.T_KILL,
|
||||||
|
TaskEventType.T_SCHEDULE,
|
||||||
TaskEventType.T_ATTEMPT_KILLED,
|
TaskEventType.T_ATTEMPT_KILLED,
|
||||||
TaskEventType.T_ADD_SPEC_ATTEMPT))
|
TaskEventType.T_ADD_SPEC_ATTEMPT))
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class TestKill {
|
||||||
Job job = app.submit(new Configuration());
|
Job job = app.submit(new Configuration());
|
||||||
|
|
||||||
//wait and vailidate for Job to become RUNNING
|
//wait and vailidate for Job to become RUNNING
|
||||||
app.waitForState(job, JobState.RUNNING);
|
app.waitForInternalState((JobImpl) job, JobStateInternal.RUNNING);
|
||||||
Map<TaskId,Task> tasks = job.getTasks();
|
Map<TaskId,Task> tasks = job.getTasks();
|
||||||
Assert.assertEquals("No of tasks is not correct", 2,
|
Assert.assertEquals("No of tasks is not correct", 2,
|
||||||
tasks.size());
|
tasks.size());
|
||||||
|
|
Loading…
Reference in New Issue