()
| 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 { |
nothing calls this directly
no test coverage detected