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

Method postQuerySimplePass

test/tsd/TestQueryRpc.java:489–503  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

487 }
488
489 @Test
490 public void postQuerySimplePass() throws Exception {
491 final DataPoints[] datapoints = new DataPoints[1];
492 datapoints[0] = new MockDataPoints().getMock();
493 when(query_result.runAsync()).thenReturn(
494 Deferred.fromResult(datapoints));
495
496 HttpQuery query = NettyMocks.postQuery(tsdb, "/api/query",
497 "{\"start\":1425440315306,\"queries\":" +
498 "[{\"metric\":\"somemetric\",\"aggregator\":\"sum\",\"rate\":true," +
499 "\"rateOptions\":{\"counter\":false}}]}");
500 NettyMocks.mockChannelFuture(query);
501 rpc.execute(tsdb, query);
502 assertEquals(HttpResponseStatus.OK, query.response().getStatus());
503 }
504
505 @Test
506 public void postQueryNoMetricBadRequest() throws Exception {

Callers

nothing calls this directly

Calls 7

postQueryMethod · 0.95
mockChannelFutureMethod · 0.95
getMockMethod · 0.80
responseMethod · 0.80
runAsyncMethod · 0.65
executeMethod · 0.65
getStatusMethod · 0.65

Tested by

no test coverage detected