MainDeploy { private void enableMetrics() { String influxUrl = System.getProperty("influxUrl"); String influxDbName = System.getProperty("influxDbName"); String influxUserName = System.getProperty("influxUserName"); String influxPassword = System.getProperty("influxPassword"); MetricsHelper.config(vopt, influxUrl, influxDbName, influxUserName, influxPassword); } MainDeploy();  MainDeploy(JsonObject conf);   }
@Test public void testEnableMetrics(TestContext context) { async = context.async(); String[] args = { "-enable-metrics" }; context.assertFalse(MetricsHelper.isEnabled()); MainDeploy d = new MainDeploy(); d.init(args, res -> { vertx = res.succeeded() ? res.result() : null; Assert.assertTrue("main1 " + res.cause(), res.succeeded()); context.assertTrue(res.succeeded()); context.assertTrue(MetricsHelper.isEnabled()); MetricsHelper.setEnabled(false); async.complete(); }); }