maheshrajus commented on code in PR #521:
URL: https://github.com/apache/tez/pull/521#discussion_r3631035535


##########
tez-tests/src/test/java/org/apache/tez/mapreduce/TestMRRJobsDAGApi.java:
##########
@@ -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);

Review Comment:
   Done. I kept 10s as waiting time for session ready.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to