MAPREDUCE-6641. TestTaskAttempt fails in trunk. Contributed by Haibo Chen.
This commit is contained in:
parent
99e5dd68d0
commit
69c21d2db0
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package org.apache.hadoop.mapreduce.v2.app.job.impl;
|
package org.apache.hadoop.mapreduce.v2.app.job.impl;
|
||||||
|
|
||||||
|
import static org.apache.hadoop.test.GenericTestUtils.waitFor;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertFalse;
|
import static org.junit.Assert.assertFalse;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
@ -391,8 +392,8 @@ private void testMRAppHistory(MRApp app) throws Exception {
|
|||||||
Map<TaskAttemptId, TaskAttempt> attempts = task.getAttempts();
|
Map<TaskAttemptId, TaskAttempt> attempts = task.getAttempts();
|
||||||
TaskAttempt attempt = attempts.values().iterator().next();
|
TaskAttempt attempt = attempts.values().iterator().next();
|
||||||
app.waitForState(attempt, TaskAttemptState.KILLED);
|
app.waitForState(attempt, TaskAttemptState.KILLED);
|
||||||
Assert.assertTrue("No Ta Started JH Event", app.getTaStartJHEvent());
|
waitFor(app::getTaStartJHEvent, 100, 800);
|
||||||
Assert.assertTrue("No Ta Killed JH Event", app.getTaKilledJHEvent());
|
waitFor(app::getTaKilledJHEvent, 100, 800);
|
||||||
}
|
}
|
||||||
|
|
||||||
static class FailingAttemptsMRApp extends MRApp {
|
static class FailingAttemptsMRApp extends MRApp {
|
||||||
|
Loading…
Reference in New Issue
Block a user