From d83672d71c44c74b1f2997f8c9dc9a25c9fd5daf Mon Sep 17 00:00:00 2001 From: Vinod Kumar Vavilapalli Date: Sat, 25 Feb 2012 02:30:55 +0000 Subject: [PATCH] MAPREDUCE-2793. Reneabling commented out test from previous comment. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1293521 13f79535-47bb-0310-9956-ffa450edef68 --- .../hs/webapp/TestHsWebServicesJobsQuery.java | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHsWebServicesJobsQuery.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHsWebServicesJobsQuery.java index ed58a6f3b7..7376798e4c 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHsWebServicesJobsQuery.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHsWebServicesJobsQuery.java @@ -173,7 +173,7 @@ public TestHsWebServicesJobsQuery() { .contextPath("jersey-guice-filter").servletPath("/").build()); } - //@Test + @Test public void testJobsQueryUserNone() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") @@ -187,7 +187,6 @@ public void testJobsQueryUserNone() throws JSONException, Exception { @Test public void testJobsQueryUser() throws JSONException, Exception { - System.out.println("###test start"); WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") .path("mapreduce").path("jobs").queryParam("user", "mock") @@ -204,7 +203,7 @@ public void testJobsQueryUser() throws JSONException, Exception { VerifyJobsUtils.verifyHsJob(info, job); } - //@Test + @Test public void testJobsQueryLimit() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") @@ -219,7 +218,7 @@ public void testJobsQueryLimit() throws JSONException, Exception { assertEquals("incorrect number of elements", 2, arr.length()); } - //@Test + @Test public void testJobsQueryLimitInvalid() throws JSONException, Exception { WebResource r = resource(); @@ -243,7 +242,7 @@ public void testJobsQueryLimitInvalid() throws JSONException, Exception { "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryQueue() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") @@ -257,7 +256,7 @@ public void testJobsQueryQueue() throws JSONException, Exception { assertEquals("incorrect number of elements", 3, arr.length()); } - //@Test + @Test public void testJobsQueryQueueNonExist() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") @@ -269,7 +268,7 @@ public void testJobsQueryQueueNonExist() throws JSONException, Exception { assertEquals("jobs is not null", JSONObject.NULL, json.get("jobs")); } - //@Test + @Test public void testJobsQueryStartTimeEnd() throws JSONException, Exception { WebResource r = resource(); // the mockJobs start time is the current time - some random amount @@ -286,7 +285,7 @@ public void testJobsQueryStartTimeEnd() throws JSONException, Exception { assertEquals("incorrect number of elements", 3, arr.length()); } - //@Test + @Test public void testJobsQueryStartTimeBegin() throws JSONException, Exception { WebResource r = resource(); // the mockJobs start time is the current time - some random amount @@ -301,7 +300,7 @@ public void testJobsQueryStartTimeBegin() throws JSONException, Exception { assertEquals("jobs is not null", JSONObject.NULL, json.get("jobs")); } - //@Test + @Test public void testJobsQueryStartTimeBeginEnd() throws JSONException, Exception { WebResource r = resource(); Map jobsMap = appContext.getAllJobs(); @@ -329,7 +328,7 @@ public void testJobsQueryStartTimeBeginEnd() throws JSONException, Exception { assertEquals("incorrect number of elements", size - 1, arr.length()); } - //@Test + @Test public void testJobsQueryStartTimeBeginEndInvalid() throws JSONException, Exception { WebResource r = resource(); @@ -358,7 +357,7 @@ public void testJobsQueryStartTimeBeginEndInvalid() throws JSONException, "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryStartTimeInvalidformat() throws JSONException, Exception { WebResource r = resource(); @@ -384,7 +383,7 @@ public void testJobsQueryStartTimeInvalidformat() throws JSONException, "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryStartTimeEndInvalidformat() throws JSONException, Exception { WebResource r = resource(); @@ -410,7 +409,7 @@ public void testJobsQueryStartTimeEndInvalidformat() throws JSONException, "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryStartTimeNegative() throws JSONException, Exception { WebResource r = resource(); ClientResponse response = r.path("ws").path("v1").path("history") @@ -435,7 +434,7 @@ public void testJobsQueryStartTimeNegative() throws JSONException, Exception { "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryStartTimeEndNegative() throws JSONException, Exception { WebResource r = resource(); @@ -459,7 +458,7 @@ public void testJobsQueryStartTimeEndNegative() throws JSONException, "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryFinishTimeEndNegative() throws JSONException, Exception { WebResource r = resource(); @@ -483,7 +482,7 @@ public void testJobsQueryFinishTimeEndNegative() throws JSONException, "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryFinishTimeBeginNegative() throws JSONException, Exception { WebResource r = resource(); @@ -508,7 +507,7 @@ public void testJobsQueryFinishTimeBeginNegative() throws JSONException, "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryFinishTimeBeginEndInvalid() throws JSONException, Exception { WebResource r = resource(); @@ -537,7 +536,7 @@ public void testJobsQueryFinishTimeBeginEndInvalid() throws JSONException, "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryFinishTimeInvalidformat() throws JSONException, Exception { WebResource r = resource(); @@ -563,7 +562,7 @@ public void testJobsQueryFinishTimeInvalidformat() throws JSONException, "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryFinishTimeEndInvalidformat() throws JSONException, Exception { WebResource r = resource(); @@ -589,7 +588,7 @@ public void testJobsQueryFinishTimeEndInvalidformat() throws JSONException, "org.apache.hadoop.yarn.webapp.BadRequestException", classname); } - //@Test + @Test public void testJobsQueryFinishTimeBegin() throws JSONException, Exception { WebResource r = resource(); // the mockJobs finish time is the current time + some random amount @@ -606,7 +605,7 @@ public void testJobsQueryFinishTimeBegin() throws JSONException, Exception { assertEquals("incorrect number of elements", 3, arr.length()); } - //@Test + @Test public void testJobsQueryFinishTimeEnd() throws JSONException, Exception { WebResource r = resource(); // the mockJobs finish time is the current time + some random amount @@ -621,7 +620,7 @@ public void testJobsQueryFinishTimeEnd() throws JSONException, Exception { assertEquals("jobs is not null", JSONObject.NULL, json.get("jobs")); } - //@Test + @Test public void testJobsQueryFinishTimeBeginEnd() throws JSONException, Exception { WebResource r = resource();