()
| 583 | } |
| 584 | |
| 585 | @Test |
| 586 | public void executeWithBadDSFill() throws Exception { |
| 587 | final DataPoints[] datapoints = new DataPoints[1]; |
| 588 | datapoints[0] = new MockDataPoints().getMock(); |
| 589 | when(query_result.runAsync()).thenReturn( |
| 590 | Deferred.fromResult(datapoints)); |
| 591 | |
| 592 | try { |
| 593 | final HttpQuery query = NettyMocks.getQuery(tsdb, |
| 594 | "/api/query?start=1h-ago&m=sum:10m-avg-badbadbad:sys.cpu.user"); |
| 595 | rpc.execute(tsdb, query); |
| 596 | fail("expected BadRequestException"); |
| 597 | } catch (final BadRequestException exn) { |
| 598 | System.out.println(exn.getMessage()); |
| 599 | assertTrue(exn.getMessage().startsWith( |
| 600 | "Unrecognized fill policy: badbadbad")); |
| 601 | } |
| 602 | } |
| 603 | |
| 604 | @Test |
| 605 | public void executePOST() throws Exception { |
nothing calls this directly
no test coverage detected