()
| 511 | } |
| 512 | |
| 513 | @Test |
| 514 | public void emptyResultSet() throws Exception { |
| 515 | setDataPointStorage(); |
| 516 | String json = JSON.serializeToString(getDefaultQueryBuilder()); |
| 517 | final QueryRpc rpc = new QueryRpc(); |
| 518 | final HttpQuery query = NettyMocks.postQuery(tsdb, |
| 519 | "/api/query/exp", json); |
| 520 | query.getQueryBaseRoute(); // to the correct serializer |
| 521 | NettyMocks.mockChannelFuture(query); |
| 522 | |
| 523 | rpc.execute(tsdb, query); |
| 524 | final String response = |
| 525 | query.response().getContent().toString(Charset.forName("UTF-8")); |
| 526 | assertTrue(response.contains("\"dps\":[]")); |
| 527 | assertTrue(response.contains("\"firstTimestamp\":0")); |
| 528 | assertTrue(response.contains("\"series\":0")); |
| 529 | } |
| 530 | |
| 531 | @Test |
| 532 | public void scannerException() throws Exception { |
nothing calls this directly
no test coverage detected