From caed1cfaf958271a7f9f3ad09b099443bbbb2d3b Mon Sep 17 00:00:00 2001 From: Mahadev Konar Date: Sat, 4 Feb 2012 18:55:03 +0000 Subject: [PATCH] MAPREDUCE-3723. TestAMWebServicesJobs & TestHSWebServicesJobs incorrectly asserting tests (Bhallamudi Venkata Siva Kamesh via mahadev) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1240590 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 4 ++++ .../hadoop/mapreduce/v2/app/webapp/TestAMWebServicesJobs.java | 2 +- .../hadoop/mapreduce/v2/hs/webapp/TestHsWebServicesJobs.java | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 8fc7f7fbc0..26cc9d79b6 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -689,6 +689,10 @@ Release 0.23.1 - Unreleased MAPREDUCE-3791. can't build site in hadoop-yarn-server-common. (mahadev) + MAPREDUCE-3723. TestAMWebServicesJobs & TestHSWebServicesJobs + incorrectly asserting tests (Bhallamudi Venkata Siva Kamesh + via mahadev) + Release 0.23.0 - 2011-11-01 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/webapp/TestAMWebServicesJobs.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/webapp/TestAMWebServicesJobs.java index 0f22b65750..a0846e4ac3 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/webapp/TestAMWebServicesJobs.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/webapp/TestAMWebServicesJobs.java @@ -777,7 +777,7 @@ public void verifyAMJobCounters(JSONObject info, Job job) assertTrue("name not set", (name != null && !name.isEmpty())); JSONArray counters = counterGroup.getJSONArray("counter"); for (int j = 0; j < counters.length(); j++) { - JSONObject counter = counters.getJSONObject(i); + JSONObject counter = counters.getJSONObject(j); String counterName = counter.getString("name"); assertTrue("counter name not set", (counterName != null && !counterName.isEmpty())); diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHsWebServicesJobs.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHsWebServicesJobs.java index 24926045b1..fd81180956 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHsWebServicesJobs.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHsWebServicesJobs.java @@ -617,7 +617,7 @@ public void verifyHsJobCounters(JSONObject info, Job job) assertTrue("name not set", (name != null && !name.isEmpty())); JSONArray counters = counterGroup.getJSONArray("counter"); for (int j = 0; j < counters.length(); j++) { - JSONObject counter = counters.getJSONObject(i); + JSONObject counter = counters.getJSONObject(j); String counterName = counter.getString("name"); assertTrue("counter name not set", (counterName != null && !counterName.isEmpty()));