YARN-9404. TestApplicationLifetimeMonitor#testApplicationLifetimeMonitor fails intermittent. Contributed by Prabhu Joseph.

This commit is contained in:
Giovanni Matteo Fumarola 2019-03-22 11:45:39 -07:00
parent 1d389ecb24
commit 509b20b292

View File

@ -204,13 +204,12 @@ public void testApplicationLifetimeMonitor()
// app4 submitted exceeding queue max lifetime,
// so killed after queue max lifetime.
rm.waitForState(app4.getApplicationId(), RMAppState.KILLED);
long totalTimeRun =
(app4.getFinishTime() - app4.getSubmitTime()) / 1000;
long totalTimeRun = app4.getFinishTime() - app4.getSubmitTime();
Assert.assertTrue("Application killed before lifetime value",
totalTimeRun > maxLifetime);
totalTimeRun > (maxLifetime * 1000));
Assert.assertTrue(
"Application killed before lifetime value " + totalTimeRun,
totalTimeRun < maxLifetime + 10L);
totalTimeRun < ((maxLifetime + 10L) * 1000));
}
} finally {
stopRM(rm);