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

Method validateWithTimezone

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

Source from the content-addressed store, hash-verified

60 }
61
62 @Test
63 public void validateWithTimezone() {
64 TSQuery q = this.getMetricForValidate();
65 q.setUseCalendar(true);
66 q.setTimezone("Pacific/Funafuti");
67 q.validateAndSetQuery();
68 assertEquals(1356998400000L, q.startTime());
69 assertEquals(1356998460000L, q.endTime());
70 assertEquals("sys.cpu.0", q.getQueries().get(0).getMetric());
71 assertEquals("wildcard(*)", q.getQueries().get(0).getTags().get("host"));
72 assertEquals("literal_or(lga)", q.getQueries().get(0).getTags().get("dc"));
73 assertEquals(Aggregators.SUM, q.getQueries().get(0).aggregator());
74 assertEquals(Aggregators.AVG, q.getQueries().get(0).downsampler());
75 assertEquals(300000, q.getQueries().get(0).downsampleInterval());
76 assertEquals("Pacific/Funafuti", q.getTimezone());
77 assertEquals("Pacific/Funafuti", q.getQueries().get(0).downsamplingSpecification()
78 .getTimezone().getID());
79 assertTrue(q.getQueries().get(0).downsamplingSpecification().useCalendar());
80 }
81
82 @Test
83 public void validateVerifyNoDSOverrideWithCalendar() {

Callers

nothing calls this directly

Calls 15

getMetricForValidateMethod · 0.95
setUseCalendarMethod · 0.95
setTimezoneMethod · 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

Tested by

no test coverage detected