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

Method before

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

Source from the content-addressed store, hash-verified

84 }
85
86 @Before
87 public void before() throws Exception {
88 tsdb = NettyMocks.getMockedHTTPTSDB();
89 empty_query = mock(Query.class);
90 query_result = mock(Query.class);
91 rpc = new QueryRpc();
92 expressions = null;
93
94 when(tsdb.newQuery()).thenReturn(query_result);
95 when(empty_query.run()).thenReturn(new DataPoints[0]);
96 when(query_result.configureFromQuery((TSQuery)any(), anyInt()))
97 .thenReturn(Deferred.fromResult(null));
98 when(query_result.runAsync())
99 .thenReturn(Deferred.fromResult(new DataPoints[0]));
100 }
101
102 @Test
103 public void parseQueryMType() throws Exception {

Callers

nothing calls this directly

Calls 5

getMockedHTTPTSDBMethod · 0.95
newQueryMethod · 0.80
runMethod · 0.65
configureFromQueryMethod · 0.65
runAsyncMethod · 0.65

Tested by

no test coverage detected