MAPREDUCE-5446. TestJobHistoryEvents and TestJobHistoryParsing have race conditions. Contributed by Jason Lowe.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1510581 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
41e2518e0c
commit
34ae96fd8c
|
@ -186,6 +186,9 @@ Release 2.1.1-beta - UNRELEASED
|
||||||
MAPREDUCE-5352. Optimize node local splits generated by
|
MAPREDUCE-5352. Optimize node local splits generated by
|
||||||
CombineFileInputFormat. (sseth)
|
CombineFileInputFormat. (sseth)
|
||||||
|
|
||||||
|
MAPREDUCE-5446. TestJobHistoryEvents and TestJobHistoryParsing have race
|
||||||
|
conditions (jlowe via kihwal)
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
MAPREDUCE-5385. Fixed a bug with JobContext getCacheFiles API. (Omkar Vinit
|
MAPREDUCE-5385. Fixed a bug with JobContext getCacheFiles API. (Omkar Vinit
|
||||||
|
|
|
@ -357,6 +357,10 @@ public class MRApp extends MRAppMaster {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void waitForState(Service.STATE finalState) throws Exception {
|
public void waitForState(Service.STATE finalState) throws Exception {
|
||||||
|
if (finalState == Service.STATE.STOPPED) {
|
||||||
|
Assert.assertTrue("Timeout while waiting for MRApp to stop",
|
||||||
|
waitForServiceToStop(20 * 1000));
|
||||||
|
} else {
|
||||||
int timeoutSecs = 0;
|
int timeoutSecs = 0;
|
||||||
while (!finalState.equals(getServiceState()) && timeoutSecs++ < 20) {
|
while (!finalState.equals(getServiceState()) && timeoutSecs++ < 20) {
|
||||||
System.out.println("MRApp State is : " + getServiceState()
|
System.out.println("MRApp State is : " + getServiceState()
|
||||||
|
@ -367,6 +371,7 @@ public class MRApp extends MRAppMaster {
|
||||||
Assert.assertEquals("MRApp state is not correct (timedout)", finalState,
|
Assert.assertEquals("MRApp state is not correct (timedout)", finalState,
|
||||||
getServiceState());
|
getServiceState());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void verifyCompleted() {
|
public void verifyCompleted() {
|
||||||
for (Job job : getContext().getAllJobs().values()) {
|
for (Job job : getContext().getAllJobs().values()) {
|
||||||
|
|
Loading…
Reference in New Issue