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

Method beforeLocal

test/query/expression/TestDiffSeries.java:58–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 private DiffSeries func;
57
58 @Before
59 public void beforeLocal() throws Exception {
60 view = SeekableViewsForTest.generator(START_TIME, INTERVAL,
61 NUM_POINTS, true, 1, 1);
62 data_query = mock(TSQuery.class);
63 when(data_query.startTime()).thenReturn(START_TIME);
64 when(data_query.endTime()).thenReturn(START_TIME + (INTERVAL * NUM_POINTS));
65
66 dps = PowerMockito.mock(DataPoints.class);
67 when(dps.iterator()).thenReturn(view);
68 when(dps.metricName()).thenReturn(METRIC_STRING);
69 when(dps.metricUID()).thenReturn(new byte[] {0,0,1});
70
71 group_bys = new DataPoints[] { dps };
72
73 query_results = new ArrayList<DataPoints[]>(1);
74 query_results.add(group_bys);
75
76 params = new ArrayList<String>(1);
77 func = new DiffSeries(tsdb);
78 }
79
80 @Test
81 public void diffOneSeriesEach() throws Exception {

Callers

nothing calls this directly

Calls 7

generatorMethod · 0.95
startTimeMethod · 0.80
endTimeMethod · 0.80
iteratorMethod · 0.65
metricNameMethod · 0.65
metricUIDMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected