From d94c092ad1e6007ca98979c2f83e57e52b740b44 Mon Sep 17 00:00:00 2001 From: Rohith Sharma K S Date: Fri, 18 Sep 2015 08:44:10 +0530 Subject: [PATCH] YARN-4135. Improve the assertion message in MockRM while failing after waiting for the state.(Nijel S F via rohithsharmaks) (cherry picked from commit 723c31d45bc0f64b1d1a67350b108059d2a220a3) --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../apache/hadoop/yarn/server/resourcemanager/MockRM.java | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index ec05090723e..e62bdedf918 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -796,6 +796,9 @@ Release 2.8.0 - UNRELEASED YARN-4078. Add getPendingResourceRequestForAttempt in YarnScheduler interface. (Naganarasimha G R via jianhe) + YARN-4135. Improve the assertion message in MockRM while failing after waiting for the state. + (Nijel S F via rohithsharmaks) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockRM.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockRM.java index e464401387c..249f093bda2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockRM.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockRM.java @@ -156,7 +156,8 @@ public class MockRM extends ResourceManager { LOG.info("App State is : " + app.getState()); if (waitedMsecs >= timeoutMsecs) { Assert.fail("App state is not correct (timedout): expected: " + - finalState + " actual: " + app.getState()); + finalState + " actual: " + app.getState() + + " for the application " + appId); } } @@ -185,7 +186,8 @@ public class MockRM extends ResourceManager { LOG.info("Attempt State is : " + attempt.getAppAttemptState()); if (waitedMsecs >= timeoutMsecs) { Assert.fail("Attempt state is not correct (timedout): expected: " - + finalState + " actual: " + attempt.getAppAttemptState()); + + finalState + " actual: " + attempt.getAppAttemptState()+ + " for the application attempt " + attemptId); } }