()
| 224 | } |
| 225 | |
| 226 | @Test |
| 227 | public void configureFromQueryWithRate() throws Exception { |
| 228 | setDataPointStorage(); |
| 229 | final TSQuery ts_query = getTSQuery(); |
| 230 | final RateOptions rate_options = new RateOptions(); |
| 231 | rate_options.setResetValue(1024); |
| 232 | ts_query.getQueries().get(0).setRateOptions(rate_options); |
| 233 | ts_query.validateAndSetQuery(); |
| 234 | query = new TsdbQuery(tsdb); |
| 235 | query.configureFromQuery(ts_query, 0).joinUninterruptibly(); |
| 236 | |
| 237 | assertArrayEquals(METRIC_BYTES, ForTesting.getMetric(query)); |
| 238 | assertEquals(1, ForTesting.getFilters(query).size()); |
| 239 | assertArrayEquals(TAGK_BYTES, ForTesting.getGroupBys(query).get(0)); |
| 240 | assertEquals(1, ForTesting.getGroupBys(query).size()); |
| 241 | assertTrue(rate_options == ForTesting.getRateOptions(query)); |
| 242 | } |
| 243 | |
| 244 | @Test |
| 245 | public void configureFromQueryNoTags() throws Exception { |
nothing calls this directly
no test coverage detected