YARN-5934. Fix TestTimelineWebServices.testPrimaryFilterNumericString (Akira Ajisaka via Varun Saxena)
This commit is contained in:
parent
cc938e99ec
commit
f462e1ff68
|
@ -334,33 +334,6 @@ public class TestTimelineWebServices extends JerseyTestBase {
|
||||||
verifyEntities(response.getEntity(TimelineEntities.class));
|
verifyEntities(response.getEntity(TimelineEntities.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testPrimaryFilterNumericString() {
|
|
||||||
// without quotes, 123abc is interpreted as the number 123,
|
|
||||||
// which finds no entities
|
|
||||||
WebResource r = resource();
|
|
||||||
ClientResponse response = r.path("ws").path("v1").path("timeline")
|
|
||||||
.path("type_1").queryParam("primaryFilter", "other:123abc")
|
|
||||||
.accept(MediaType.APPLICATION_JSON)
|
|
||||||
.get(ClientResponse.class);
|
|
||||||
assertEquals(MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
|
|
||||||
response.getType().toString());
|
|
||||||
assertEquals(0, response.getEntity(TimelineEntities.class).getEntities()
|
|
||||||
.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testPrimaryFilterNumericStringWithQuotes() {
|
|
||||||
WebResource r = resource();
|
|
||||||
ClientResponse response = r.path("ws").path("v1").path("timeline")
|
|
||||||
.path("type_1").queryParam("primaryFilter", "other:\"123abc\"")
|
|
||||||
.accept(MediaType.APPLICATION_JSON)
|
|
||||||
.get(ClientResponse.class);
|
|
||||||
assertEquals(MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8,
|
|
||||||
response.getType().toString());
|
|
||||||
verifyEntities(response.getEntity(TimelineEntities.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSecondaryFilters() {
|
public void testSecondaryFilters() {
|
||||||
WebResource r = resource();
|
WebResource r = resource();
|
||||||
|
|
Loading…
Reference in New Issue