()
| 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 { |
nothing calls this directly
no test coverage detected