@Test public void fateNewStatus() { long tx1Id = zooStore.create(); log.debug("ZooStore tx1 id {}", tx1Id); FateMetrics metrics = new FateMetrics(context, 10); metrics.overrideRefresh(0); InMemTestCollector collector = new InMemTestCollector(); metrics.getMetrics(collector, true); log.debug("Collector: {}", collector); assertTrue(collector.contains("FateTxState_NEW")); assertEquals(1L, collector.getValue("FateTxState_NEW")); assertEquals(1L, collector.getValue("currentFateOps")); assertTrue(collector.contains("FateTxState_IN_PROGRESS")); assertEquals(0L, collector.getValue("FateTxState_IN_PROGRESS")); EasyMock.verify(master); }
void overrideRefresh(final long minimumRefreshDelay) { long delay = Math.max(0, minimumRefreshDelay); this.minimumRefreshDelay = TimeUnit.SECONDS.toMillis(delay); }
FateMetrics extends MasterMetrics { void overrideRefresh(final long minimumRefreshDelay) { long delay = Math.max(0, minimumRefreshDelay); this.minimumRefreshDelay = TimeUnit.SECONDS.toMillis(delay); } }
FateMetrics extends MasterMetrics { void overrideRefresh(final long minimumRefreshDelay) { long delay = Math.max(0, minimumRefreshDelay); this.minimumRefreshDelay = TimeUnit.SECONDS.toMillis(delay); } FateMetrics(final ServerContext context, final long minimumRefreshDelay); }
FateMetrics extends MasterMetrics { void overrideRefresh(final long minimumRefreshDelay) { long delay = Math.max(0, minimumRefreshDelay); this.minimumRefreshDelay = TimeUnit.SECONDS.toMillis(delay); } FateMetrics(final ServerContext context, final long minimumRefreshDelay);  }
FateMetrics extends MasterMetrics { void overrideRefresh(final long minimumRefreshDelay) { long delay = Math.max(0, minimumRefreshDelay); this.minimumRefreshDelay = TimeUnit.SECONDS.toMillis(delay); } FateMetrics(final ServerContext context, final long minimumRefreshDelay);   }