use of io.vertx.test.fakemetrics.FakeMetricsFactory in project vert.x by eclipse.
the class HttpMetricsTest method getOptions.
@Override
protected VertxOptions getOptions() {
VertxOptions options = super.getOptions();
options.setMetricsOptions(new MetricsOptions().setEnabled(true).setFactory(new FakeMetricsFactory()));
return options;
}
use of io.vertx.test.fakemetrics.FakeMetricsFactory in project vert.x by eclipse.
the class HttpMetricsTestBase method getOptions.
@Override
protected VertxOptions getOptions() {
VertxOptions options = super.getOptions();
options.setMetricsOptions(new MetricsOptions().setEnabled(true).setFactory(new FakeMetricsFactory()));
return options;
}
use of io.vertx.test.fakemetrics.FakeMetricsFactory in project vert.x by eclipse.
the class LauncherExtensibilityTest method testThatCustomLauncherCanCustomizeMetricsOption.
@Test
public void testThatCustomLauncherCanCustomizeMetricsOption() throws Exception {
Launcher myLauncher = new Launcher() {
@Override
protected String getMainVerticle() {
return HttpTestVerticle.class.getName();
}
@Override
public void afterStartingVertx(Vertx vertx) {
LauncherExtensibilityTest.this.vertx = vertx;
}
@Override
public void beforeStartingVertx(VertxOptions options) {
options.getMetricsOptions().setEnabled(true).setFactory(new FakeMetricsFactory());
}
};
myLauncher.dispatch(new String[0]);
assertWaitUntil(() -> {
try {
return RunCommandTest.getHttpCode() == 200;
} catch (IOException e) {
return false;
}
});
assertThat(RunCommandTest.getContent().getBoolean("metrics")).isEqualTo(true);
}
Aggregations