()
| 529 | } |
| 530 | |
| 531 | @Test |
| 532 | public void scannerException() throws Exception { |
| 533 | oneExtraSameE(); |
| 534 | storage.throwException(MockBase.stringToBytes( |
| 535 | "00000B5553E58000000D00000F00000E00000E"), |
| 536 | new RuntimeException("Boo!"), true); |
| 537 | final String json = JSON.serializeToString(getDefaultQueryBuilder().build()); |
| 538 | |
| 539 | final QueryRpc rpc = new QueryRpc(); |
| 540 | final HttpQuery query = NettyMocks.postQuery(tsdb, |
| 541 | "/api/query/exp", json); |
| 542 | query.getQueryBaseRoute(); // to the correct serializer |
| 543 | NettyMocks.mockChannelFuture(query); |
| 544 | |
| 545 | rpc.execute(tsdb, query); |
| 546 | final String response = |
| 547 | query.response().getContent().toString(Charset.forName("UTF-8")); |
| 548 | assertTrue(response.contains("\"code\":400")); |
| 549 | assertTrue(response.contains("\"message\":\"Boo!\"")); |
| 550 | } |
| 551 | |
| 552 | @Test |
| 553 | public void nsunMetric() throws Exception { |
nothing calls this directly
no test coverage detected