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

Method validate

test/core/TestTSQuery.java:44–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 }
43
44 @Test
45 public void validate() {
46 TSQuery q = this.getMetricForValidate();
47 q.validateAndSetQuery();
48 assertEquals(1356998400000L, q.startTime());
49 assertEquals(1356998460000L, q.endTime());
50 assertEquals("sys.cpu.0", q.getQueries().get(0).getMetric());
51 assertEquals("wildcard(*)", q.getQueries().get(0).getTags().get("host"));
52 assertEquals("literal_or(lga)", q.getQueries().get(0).getTags().get("dc"));
53 assertEquals(Aggregators.SUM, q.getQueries().get(0).aggregator());
54 assertEquals(Aggregators.AVG, q.getQueries().get(0).downsampler());
55 assertEquals(300000, q.getQueries().get(0).downsampleInterval());
56 assertNull(q.getTimezone());
57 assertEquals("UTC", q.getQueries().get(0).downsamplingSpecification()
58 .getTimezone().getID());
59 assertFalse(q.getQueries().get(0).downsamplingSpecification().useCalendar());
60 }
61
62 @Test
63 public void validateWithTimezone() {

Callers

nothing calls this directly

Calls 15

getMetricForValidateMethod · 0.95
validateAndSetQueryMethod · 0.95
startTimeMethod · 0.95
endTimeMethod · 0.95
getQueriesMethod · 0.95
getTimezoneMethod · 0.95
aggregatorMethod · 0.80
downsampleIntervalMethod · 0.80
useCalendarMethod · 0.80
getTagsMethod · 0.65
getMetricMethod · 0.45

Tested by

no test coverage detected