MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / scannerException

Method scannerException

test/tsd/TestQueryExecutor.java:531–550  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

529 }
530
531 @Test
532 public void scannerException() throws Exception {
533 oneExtraSameE();
534 storage.throwException(MockBase.stringToBytes(
535 "00000B5553E58000000D00000F00000E00000E"),
536 new RuntimeException("Boo!"), true);
537 final String json = JSON.serializeToString(getDefaultQueryBuilder().build());
538
539 final QueryRpc rpc = new QueryRpc();
540 final HttpQuery query = NettyMocks.postQuery(tsdb,
541 "/api/query/exp", json);
542 query.getQueryBaseRoute(); // to the correct serializer
543 NettyMocks.mockChannelFuture(query);
544
545 rpc.execute(tsdb, query);
546 final String response =
547 query.response().getContent().toString(Charset.forName("UTF-8"));
548 assertTrue(response.contains("\"code\":400"));
549 assertTrue(response.contains("\"message\":\"Boo!\""));
550 }
551
552 @Test
553 public void nsunMetric() throws Exception {

Callers

nothing calls this directly

Calls 14

stringToBytesMethod · 0.95
serializeToStringMethod · 0.95
postQueryMethod · 0.95
getQueryBaseRouteMethod · 0.95
mockChannelFutureMethod · 0.95
executeMethod · 0.95
oneExtraSameEMethod · 0.80
throwExceptionMethod · 0.80
responseMethod · 0.80
containsMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected