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

Method executeURI

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

Source from the content-addressed store, hash-verified

533 }
534
535 @Test
536 public void executeURI() throws Exception {
537 final DataPoints[] datapoints = new DataPoints[1];
538 datapoints[0] = new MockDataPoints().getMock();
539 when(query_result.runAsync()).thenReturn(
540 Deferred.fromResult(datapoints));
541
542 final HttpQuery query = NettyMocks.getQuery(tsdb,
543 "/api/query?start=1h-ago&m=sum:sys.cpu.user");
544 NettyMocks.mockChannelFuture(query);
545 rpc.execute(tsdb, query);
546 final String json =
547 query.response().getContent().toString(Charset.forName("UTF-8"));
548 assertTrue(json.contains("\"metric\":\"system.cpu.user\""));
549 }
550
551 @Test
552 public void executeURIDuplicates() 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