use of io.vertx.test.faketracer.FakeTracer in project vert.x by eclipse.
the class VertxFactoryTest method testFactoryTracerFactoryOverridesOptions.
@Test
public void testFactoryTracerFactoryOverridesOptions() {
FakeTracer tracer = new FakeTracer();
TracingOptions tracingOptions = new TracingOptions().setFactory(new VertxTracerFactory() {
@Override
public VertxTracer tracer(TracingOptions options) {
throw new AssertionError();
}
});
VertxBuilder factory = new VertxBuilder(new VertxOptions().setTracingOptions(tracingOptions));
factory.tracer(tracer);
factory.init();
Vertx vertx = factory.vertx();
assertSame(tracer, ((VertxInternal) vertx).getOrCreateContext().tracer());
}
use of io.vertx.test.faketracer.FakeTracer in project vert.x by eclipse.
the class VertxFactoryTest method testFactoryTracerOverridesMetaInf.
@Test
public void testFactoryTracerOverridesMetaInf() {
runWithServiceFromMetaInf(VertxTracerFactory.class, FakeTracerFactory.class.getName(), () -> {
FakeTracer tracer = new FakeTracer();
TracingOptions tracingOptions = new TracingOptions();
VertxBuilder factory = new VertxBuilder(new VertxOptions().setTracingOptions(tracingOptions));
factory.tracer(tracer);
factory.init();
Vertx vertx = factory.vertx();
assertSame(tracer, ((VertxInternal) vertx).getOrCreateContext().tracer());
});
}
Aggregations