MAPREDUCE-6815. Fix flaky TestKill.testKillTask(). Contributed by Haibo Chen
This commit is contained in:
parent
f304ccae3c
commit
0cfd7ad21f
@ -259,6 +259,7 @@ TaskEventType.T_ATTEMPT_KILLED, new RetroactiveKilledTransition())
|
|||||||
// 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))
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ public void testKillTask() throws Exception {
|
|||||||
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
Block a user