YARN-1419. TestFifoScheduler.testAppAttemptMetrics fails intermittently under jdk7. Contributed by Jonathan Eagles

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1543117 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Darrell Lowe 2013-11-18 19:24:05 +00:00
parent e3d7ef36ef
commit e77aec001f
2 changed files with 7 additions and 2 deletions

View File

@ -139,6 +139,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 void testAppAttemptMetrics() throws Exception {
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 void testAppAttemptMetrics() throws Exception {
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)