MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / executeWithBadDSFill

Method executeWithBadDSFill

test/tsd/TestQueryRpc.java:585–602  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

getQueryMethod · 0.95
getMockMethod · 0.80
runAsyncMethod · 0.65
executeMethod · 0.65
getMessageMethod · 0.65

Tested by

no test coverage detected