Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,24 @@ public void testAMRelocalization() throws Exception {
additionalResources.put("test.jar", createLrObjFromPath(relocFilePath));
additionalResources.put("TezAppJar.jar", createLrObjFromPath(tezAppJarRemote));

assertEquals(TezAppMasterStatus.READY, tezSession.getAppMasterStatus());
waitForSessionReady(tezSession);
finalState = testMRRSleepJobDagSubmitCore(true, false, false,
tezSession, true, MRInputAMSplitGeneratorRelocalizationTest.class, additionalResources);
assertEquals(DAGStatus.State.SUCCEEDED, finalState);
assertEquals(TezAppMasterStatus.READY, tezSession.getAppMasterStatus());
waitForSessionReady(tezSession);
assertTrue(remoteFs.exists(new Path("/tmp/relocalizationfilefound")));

stopAndVerifyYarnApp(tezSession);
}

private void waitForSessionReady(TezClient tezSession)
throws IOException, TezException, InterruptedException {
boolean ready = tezSession.waitTillReady(60, TimeUnit.SECONDS);
assertTrue(ready, "TezSession did not reach READY within 60s, current status: "
+ tezSession.getAppMasterStatus());
assertEquals(TezAppMasterStatus.READY, tezSession.getAppMasterStatus());
}

private void stopAndVerifyYarnApp(TezClient tezSession) throws TezException,
IOException, YarnException {
ApplicationId appId = tezSession.getAppMasterApplicationId();
Expand Down Expand Up @@ -512,11 +520,11 @@ public void testMultipleMRRSleepJobViaSession() throws IOException,
State finalState = testMRRSleepJobDagSubmitCore(true, false, false,
tezSession, false, null, null);
assertEquals(DAGStatus.State.SUCCEEDED, finalState);
assertEquals(TezAppMasterStatus.READY, tezSession.getAppMasterStatus());
waitForSessionReady(tezSession);
finalState = testMRRSleepJobDagSubmitCore(true, false, false,
tezSession, false, null, null);
assertEquals(DAGStatus.State.SUCCEEDED, finalState);
assertEquals(TezAppMasterStatus.READY, tezSession.getAppMasterStatus());
waitForSessionReady(tezSession);

stopAndVerifyYarnApp(tezSession);
}
Expand Down