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

Method internalErrorDeprecatedJSON

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

Source from the content-addressed store, hash-verified

797 }
798
799 @Test
800 public void internalErrorDeprecatedJSON() {
801 HttpQuery query = NettyMocks.getQuery(tsdb, "/?json");
802 try {
803 throw new Exception("Internal Error");
804 } catch (Exception e) {
805 query.internalError(e);
806 }
807 assertEquals(HttpResponseStatus.INTERNAL_SERVER_ERROR,
808 query.response().getStatus());
809 assertEquals(
810 "{\"err\":\"java.lang.Exception: Internal Error",
811 query.response().getContent().toString(Charset.forName("UTF-8"))
812 .substring(0, 43));
813 }
814
815 @Test
816 public void internalErrorDefaultSerializer() {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected