MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / badRequestDeprecatedJSON

Method badRequestDeprecatedJSON

test/tsd/TestHttpQuery.java:853–865  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

851 }
852
853 @Test
854 public void badRequestDeprecatedJSON() {
855 HttpQuery query = NettyMocks.getQuery(tsdb, "/?json");
856 try {
857 throw new BadRequestException("Bad user error");
858 } catch (BadRequestException e) {
859 query.badRequest(e);
860 }
861 assertEquals(HttpResponseStatus.BAD_REQUEST, query.response().getStatus());
862 assertEquals(
863 "{\"err\":\"Bad user error\"}",
864 query.response().getContent().toString(Charset.forName("UTF-8")));
865 }
866
867 @Test
868 public void badRequestDefaultSerializer() {

Callers

nothing calls this directly

Calls 6

getQueryMethod · 0.95
badRequestMethod · 0.95
responseMethod · 0.80
getStatusMethod · 0.65
toStringMethod · 0.45
getContentMethod · 0.45

Tested by

no test coverage detected