use of io.vertx.core.spi.VertxTracerFactory 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());
}
Aggregations