@Override public void run() { stopReporting(); try { close(); } catch (IOException e) { log.warn("Unable to close " + this.getClass().getCanonicalName(), e); } } });
RootMetricContext.get().stopReporting();
@Test public void testReporterCanBeAddedToStartedContext() throws Exception { RootMetricContext.get().startReporting(); ContextStoreReporter reporter = new ContextStoreReporter("testReporter", ConfigFactory.empty()); Assert.assertTrue(reporter.isStarted()); RootMetricContext.get().stopReporting(); }
@Override public void run() { stopReporting(); try { close(); } catch (IOException e) { log.warn("Unable to close " + this.getClass().getCanonicalName(), e); } } });
RootMetricContext.get().stopReporting();