()
| 619 | } |
| 620 | |
| 621 | @Test |
| 622 | public void executePOSTDuplicates() throws Exception { |
| 623 | final DataPoints[] datapoints = new DataPoints[1]; |
| 624 | datapoints[0] = new MockDataPoints().getMock(); |
| 625 | when(query_result.runAsync()).thenReturn( |
| 626 | Deferred.fromResult(datapoints)); |
| 627 | |
| 628 | final HttpQuery query = NettyMocks.postQuery(tsdb,"/api/query", |
| 629 | "{\"start\":\"1h-ago\",\"queries\":" + |
| 630 | "[{\"metric\":\"sys.cpu.user\",\"aggregator\":\"sum\"}," |
| 631 | + "{\"metric\":\"sys.cpu.user\",\"aggregator\":\"sum\"}]}"); |
| 632 | NettyMocks.mockChannelFuture(query); |
| 633 | rpc.execute(tsdb, query); |
| 634 | final String json = |
| 635 | query.response().getContent().toString(Charset.forName("UTF-8")); |
| 636 | assertTrue(json.contains("\"metric\":\"system.cpu.user\"")); |
| 637 | } |
| 638 | |
| 639 | @Test (expected = BadRequestException.class) |
| 640 | public void deleteDatapointsBadRequest() throws Exception { |
nothing calls this directly
no test coverage detected