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

Method badRequestDeprecated

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

Source from the content-addressed store, hash-verified

836 }
837
838 @Test
839 public void badRequestDeprecated() {
840 HttpQuery query = NettyMocks.getQuery(tsdb, "/");
841 try {
842 throw new BadRequestException("Bad user error");
843 } catch (BadRequestException e) {
844 query.badRequest(e);
845 }
846 assertEquals(HttpResponseStatus.BAD_REQUEST, query.response().getStatus());
847 assertEquals(
848 "<!DOCTYPE html>",
849 query.response().getContent().toString(Charset.forName("UTF-8"))
850 .substring(0, 15));
851 }
852
853 @Test
854 public void badRequestDeprecatedJSON() {

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