svn merge -c 1543117 FIXES: YARN-1419. TestFifoScheduler.testAppAttemptMetrics fails intermittently under jdk7. Contributed by Jonathan Eagles

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1543121 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Darrell Lowe 2013-11-18 19:29:29 +00:00
parent c155a5b368
commit 40129be1fe
2 changed files with 7 additions and 2 deletions

View File

@ -121,6 +121,9 @@ Release 2.3.0 - UNRELEASED
YARN-1411. HA config shouldn't affect NodeManager RPC addresses (Karthik
Kambatla via bikas)
YARN-1419. TestFifoScheduler.testAppAttemptMetrics fails intermittently
under jdk7 (Jonathan Eagles via jlowe)
Release 2.2.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -141,6 +141,8 @@ public class TestFifoScheduler {
FifoScheduler schedular = new FifoScheduler();
schedular.reinitialize(new Configuration(), rmContext);
QueueMetrics metrics = schedular.getRootQueueMetrics();
int beforeAppsSubmitted = metrics.getAppsSubmitted();
ApplicationId appId = BuilderUtils.newApplicationId(200, 1);
ApplicationAttemptId appAttemptId = BuilderUtils.newApplicationAttemptId(
@ -155,8 +157,8 @@ public class TestFifoScheduler {
event = new AppAddedSchedulerEvent(appAttemptId, "queue", "user");
schedular.handle(event);
QueueMetrics metrics = schedular.getRootQueueMetrics();
Assert.assertEquals(1, metrics.getAppsSubmitted());
int afterAppsSubmitted = metrics.getAppsSubmitted();
Assert.assertEquals(1, afterAppsSubmitted - beforeAppsSubmitted);
}
@Test(timeout=2000)