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

Method emptyResultSet

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

Source from the content-addressed store, hash-verified

511 }
512
513 @Test
514 public void emptyResultSet() throws Exception {
515 setDataPointStorage();
516 String json = JSON.serializeToString(getDefaultQueryBuilder());
517 final QueryRpc rpc = new QueryRpc();
518 final HttpQuery query = NettyMocks.postQuery(tsdb,
519 "/api/query/exp", json);
520 query.getQueryBaseRoute(); // to the correct serializer
521 NettyMocks.mockChannelFuture(query);
522
523 rpc.execute(tsdb, query);
524 final String response =
525 query.response().getContent().toString(Charset.forName("UTF-8"));
526 assertTrue(response.contains("\"dps\":[]"));
527 assertTrue(response.contains("\"firstTimestamp\":0"));
528 assertTrue(response.contains("\"series\":0"));
529 }
530
531 @Test
532 public void scannerException() throws Exception {

Callers

nothing calls this directly

Calls 11

serializeToStringMethod · 0.95
postQueryMethod · 0.95
getQueryBaseRouteMethod · 0.95
mockChannelFutureMethod · 0.95
executeMethod · 0.95
setDataPointStorageMethod · 0.80
responseMethod · 0.80
containsMethod · 0.80
toStringMethod · 0.45
getContentMethod · 0.45

Tested by

no test coverage detected