MAPREDUCE-2793. Reneabling commented out test from previous commit.
svn merge --ignore-ancestry -c 1293521 ../../trunk git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1293522 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2b28bb962a
commit
1c7fb4f019
|
@ -173,7 +173,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
.contextPath("jersey-guice-filter").servletPath("/").build());
|
.contextPath("jersey-guice-filter").servletPath("/").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryUserNone() throws JSONException, Exception {
|
public void testJobsQueryUserNone() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
ClientResponse response = r.path("ws").path("v1").path("history")
|
ClientResponse response = r.path("ws").path("v1").path("history")
|
||||||
|
@ -187,7 +187,6 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testJobsQueryUser() throws JSONException, Exception {
|
public void testJobsQueryUser() throws JSONException, Exception {
|
||||||
System.out.println("###test start");
|
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
ClientResponse response = r.path("ws").path("v1").path("history")
|
ClientResponse response = r.path("ws").path("v1").path("history")
|
||||||
.path("mapreduce").path("jobs").queryParam("user", "mock")
|
.path("mapreduce").path("jobs").queryParam("user", "mock")
|
||||||
|
@ -204,7 +203,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
VerifyJobsUtils.verifyHsJob(info, job);
|
VerifyJobsUtils.verifyHsJob(info, job);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryLimit() throws JSONException, Exception {
|
public void testJobsQueryLimit() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
ClientResponse response = r.path("ws").path("v1").path("history")
|
ClientResponse response = r.path("ws").path("v1").path("history")
|
||||||
|
@ -219,7 +218,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
assertEquals("incorrect number of elements", 2, arr.length());
|
assertEquals("incorrect number of elements", 2, arr.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryLimitInvalid() throws JSONException, Exception {
|
public void testJobsQueryLimitInvalid() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
|
||||||
|
@ -243,7 +242,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryQueue() throws JSONException, Exception {
|
public void testJobsQueryQueue() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
ClientResponse response = r.path("ws").path("v1").path("history")
|
ClientResponse response = r.path("ws").path("v1").path("history")
|
||||||
|
@ -257,7 +256,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
assertEquals("incorrect number of elements", 3, arr.length());
|
assertEquals("incorrect number of elements", 3, arr.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryQueueNonExist() throws JSONException, Exception {
|
public void testJobsQueryQueueNonExist() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
ClientResponse response = r.path("ws").path("v1").path("history")
|
ClientResponse response = r.path("ws").path("v1").path("history")
|
||||||
|
@ -269,7 +268,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
assertEquals("jobs is not null", JSONObject.NULL, json.get("jobs"));
|
assertEquals("jobs is not null", JSONObject.NULL, json.get("jobs"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryStartTimeEnd() throws JSONException, Exception {
|
public void testJobsQueryStartTimeEnd() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
// the mockJobs start time is the current time - some random amount
|
// the mockJobs start time is the current time - some random amount
|
||||||
|
@ -286,7 +285,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
assertEquals("incorrect number of elements", 3, arr.length());
|
assertEquals("incorrect number of elements", 3, arr.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryStartTimeBegin() throws JSONException, Exception {
|
public void testJobsQueryStartTimeBegin() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
// the mockJobs start time is the current time - some random amount
|
// the mockJobs start time is the current time - some random amount
|
||||||
|
@ -301,7 +300,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
assertEquals("jobs is not null", JSONObject.NULL, json.get("jobs"));
|
assertEquals("jobs is not null", JSONObject.NULL, json.get("jobs"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryStartTimeBeginEnd() throws JSONException, Exception {
|
public void testJobsQueryStartTimeBeginEnd() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
Map<JobId, Job> jobsMap = appContext.getAllJobs();
|
Map<JobId, Job> jobsMap = appContext.getAllJobs();
|
||||||
|
@ -329,7 +328,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
assertEquals("incorrect number of elements", size - 1, arr.length());
|
assertEquals("incorrect number of elements", size - 1, arr.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryStartTimeBeginEndInvalid() throws JSONException,
|
public void testJobsQueryStartTimeBeginEndInvalid() throws JSONException,
|
||||||
Exception {
|
Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
@ -358,7 +357,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryStartTimeInvalidformat() throws JSONException,
|
public void testJobsQueryStartTimeInvalidformat() throws JSONException,
|
||||||
Exception {
|
Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
@ -384,7 +383,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryStartTimeEndInvalidformat() throws JSONException,
|
public void testJobsQueryStartTimeEndInvalidformat() throws JSONException,
|
||||||
Exception {
|
Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
@ -410,7 +409,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryStartTimeNegative() throws JSONException, Exception {
|
public void testJobsQueryStartTimeNegative() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
ClientResponse response = r.path("ws").path("v1").path("history")
|
ClientResponse response = r.path("ws").path("v1").path("history")
|
||||||
|
@ -435,7 +434,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryStartTimeEndNegative() throws JSONException,
|
public void testJobsQueryStartTimeEndNegative() throws JSONException,
|
||||||
Exception {
|
Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
@ -459,7 +458,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryFinishTimeEndNegative() throws JSONException,
|
public void testJobsQueryFinishTimeEndNegative() throws JSONException,
|
||||||
Exception {
|
Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
@ -483,7 +482,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryFinishTimeBeginNegative() throws JSONException,
|
public void testJobsQueryFinishTimeBeginNegative() throws JSONException,
|
||||||
Exception {
|
Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
@ -508,7 +507,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryFinishTimeBeginEndInvalid() throws JSONException,
|
public void testJobsQueryFinishTimeBeginEndInvalid() throws JSONException,
|
||||||
Exception {
|
Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
@ -537,7 +536,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryFinishTimeInvalidformat() throws JSONException,
|
public void testJobsQueryFinishTimeInvalidformat() throws JSONException,
|
||||||
Exception {
|
Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
@ -563,7 +562,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryFinishTimeEndInvalidformat() throws JSONException,
|
public void testJobsQueryFinishTimeEndInvalidformat() throws JSONException,
|
||||||
Exception {
|
Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
@ -589,7 +588,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
"org.apache.hadoop.yarn.webapp.BadRequestException", classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryFinishTimeBegin() throws JSONException, Exception {
|
public void testJobsQueryFinishTimeBegin() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
// the mockJobs finish time is the current time + some random amount
|
// the mockJobs finish time is the current time + some random amount
|
||||||
|
@ -606,7 +605,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
assertEquals("incorrect number of elements", 3, arr.length());
|
assertEquals("incorrect number of elements", 3, arr.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryFinishTimeEnd() throws JSONException, Exception {
|
public void testJobsQueryFinishTimeEnd() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
// the mockJobs finish time is the current time + some random amount
|
// the mockJobs finish time is the current time + some random amount
|
||||||
|
@ -621,7 +620,7 @@ public class TestHsWebServicesJobsQuery extends JerseyTest {
|
||||||
assertEquals("jobs is not null", JSONObject.NULL, json.get("jobs"));
|
assertEquals("jobs is not null", JSONObject.NULL, json.get("jobs"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void testJobsQueryFinishTimeBeginEnd() throws JSONException, Exception {
|
public void testJobsQueryFinishTimeBeginEnd() throws JSONException, Exception {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue