()
| 823 | } |
| 824 | |
| 825 | @Test |
| 826 | public void oldStringPrefix() throws Exception { |
| 827 | final RollupInterval interval = rollup_config.getRollupInterval("10m"); |
| 828 | final Aggregator aggr = Aggregators.SUM; |
| 829 | long start_timestamp = 1356998400000L; |
| 830 | |
| 831 | storage.addColumn("tsdb-rollup-10m".getBytes(), |
| 832 | getRowKey(METRIC_STRING, 1356998400, TAGK_STRING, TAGV_STRING), |
| 833 | "t".getBytes(), |
| 834 | new byte[] { 's', 'u', 'm', ':', 0, 0 }, new byte[] { 0x2A }); |
| 835 | |
| 836 | final int time_interval = interval.getIntervalSeconds(); |
| 837 | setQuery(interval.getInterval(), aggr, tags, aggr); |
| 838 | query.configureFromQuery(ts_query, 0); |
| 839 | |
| 840 | final DataPoints[] dps = query.run(); |
| 841 | assertEquals(1, dps.length); |
| 842 | assertEquals(METRIC_STRING, dps[0].metricName()); |
| 843 | assertTrue(dps[0].getAggregatedTags().isEmpty()); |
| 844 | assertNull(dps[0].getAnnotations()); |
| 845 | assertEquals(TAGV_STRING, dps[0].getTags().get(TAGK_STRING)); |
| 846 | |
| 847 | final DataPoint dp = dps[0].iterator().next(); |
| 848 | assertFalse(dp.isInteger()); |
| 849 | assertEquals(42, dp.doubleValue(), 0.001); |
| 850 | assertEquals(start_timestamp, dp.timestamp()); |
| 851 | assertEquals(1, dps[0].size()); |
| 852 | } |
| 853 | |
| 854 | // ----------------- // |
| 855 | // Helper functions. // |
nothing calls this directly
no test coverage detected