Search in sources :

Example 1 with VertxTracerFactory

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());
}
Also used : VertxTracer(io.vertx.core.spi.tracing.VertxTracer) FakeTracer(io.vertx.test.faketracer.FakeTracer) TracingOptions(io.vertx.core.tracing.TracingOptions) VertxTracerFactory(io.vertx.core.spi.VertxTracerFactory) Vertx(io.vertx.core.Vertx) VertxOptions(io.vertx.core.VertxOptions) Test(org.junit.Test)

Aggregations

Vertx (io.vertx.core.Vertx)1 VertxOptions (io.vertx.core.VertxOptions)1 VertxTracerFactory (io.vertx.core.spi.VertxTracerFactory)1 VertxTracer (io.vertx.core.spi.tracing.VertxTracer)1 TracingOptions (io.vertx.core.tracing.TracingOptions)1 FakeTracer (io.vertx.test.faketracer.FakeTracer)1 Test (org.junit.Test)1