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

Method getLastPointTSUIDMeta

test/meta/TestTSUIDQuery.java:736–754  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

734 }
735
736 @Test
737 public void getLastPointTSUIDMeta() throws Exception {
738 Whitebox.setInternalState(config, "enable_tsuid_incrementing", false);
739 Whitebox.setInternalState(config, "enable_realtime_ts", false);
740 tsdb.addPoint(METRIC_STRING, 1388534400L, 42, tags);
741
742 Whitebox.setInternalState(config, "enable_tsuid_incrementing", true);
743 Whitebox.setInternalState(config, "enable_realtime_ts", true);
744
745 PowerMockito.mockStatic(DateTime.class);
746 PowerMockito.when(DateTime.currentTimeMillis()).thenReturn(1356998400000L);
747 query = new TSUIDQuery(tsdb, TSUID);
748 final IncomingDataPoint dp = query.getLastPoint(false, 0).join();
749 assertEquals(1388534400000L, dp.getTimestamp());
750 assertNull(dp.getMetric());
751 assertNull(dp.getTags());
752 assertEquals("42", dp.getValue());
753 assertEquals(UniqueId.uidToString(TSUID), dp.getTSUID());
754 }
755
756 @Test
757 public void getLastPointTSUIDMetaNoPoint() throws Exception {

Callers

nothing calls this directly

Calls 9

currentTimeMillisMethod · 0.95
getTimestampMethod · 0.95
getMetricMethod · 0.95
getTagsMethod · 0.95
getValueMethod · 0.95
uidToStringMethod · 0.95
getTSUIDMethod · 0.95
getLastPointMethod · 0.80
addPointMethod · 0.65

Tested by

no test coverage detected