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

Method executeURIDuplicates

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

Source from the content-addressed store, hash-verified

549 }
550
551 @Test
552 public void executeURIDuplicates() throws Exception {
553 final DataPoints[] datapoints = new DataPoints[1];
554 datapoints[0] = new MockDataPoints().getMock();
555 when(query_result.runAsync()).thenReturn(
556 Deferred.fromResult(datapoints));
557
558 final HttpQuery query = NettyMocks.getQuery(tsdb,
559 "/api/query?start=1h-ago&m=sum:sys.cpu.user&m=sum:sys.cpu.user"
560 + "&m=sum:sys.cpu.user");
561 NettyMocks.mockChannelFuture(query);
562 rpc.execute(tsdb, query);
563 final String json =
564 query.response().getContent().toString(Charset.forName("UTF-8"));
565 assertTrue(json.contains("\"metric\":\"system.cpu.user\""));
566 }
567
568 @Test
569 public void executeNSU() throws Exception {

Callers

nothing calls this directly

Calls 9

getQueryMethod · 0.95
mockChannelFutureMethod · 0.95
getMockMethod · 0.80
responseMethod · 0.80
containsMethod · 0.80
runAsyncMethod · 0.65
executeMethod · 0.65
toStringMethod · 0.45
getContentMethod · 0.45

Tested by

no test coverage detected