Search in sources :

Example 21 with TestLoggerFactory

use of io.vertx.test.netty.TestLoggerFactory in project vert.x by eclipse.

the class DatagramTest method testSendLogging.

@Test
public void testSendLogging() throws Exception {
    TestLoggerFactory factory = testLogging(new DatagramSocketOptions().setLogActivity(true), new DatagramSocketOptions());
    assertTrue(factory.hasName("io.netty.handler.logging.LoggingHandler"));
}
Also used : TestLoggerFactory(io.vertx.test.netty.TestLoggerFactory) Test(org.junit.Test)

Example 22 with TestLoggerFactory

use of io.vertx.test.netty.TestLoggerFactory in project vert.x by eclipse.

the class DNSTest method testLogActivity.

@Test
public void testLogActivity() throws Exception {
    TestLoggerFactory factory = testLogging(new DnsClientOptions().setLogActivity(true));
    assertTrue(factory.hasName("io.netty.handler.logging.LoggingHandler"));
}
Also used : DnsClientOptions(io.vertx.core.dns.DnsClientOptions) TestLoggerFactory(io.vertx.test.netty.TestLoggerFactory) Test(org.junit.Test)

Example 23 with TestLoggerFactory

use of io.vertx.test.netty.TestLoggerFactory in project vert.x by eclipse.

the class HttpTest method testServerLogging.

@Test
public void testServerLogging() throws Exception {
    server.close();
    server = vertx.createHttpServer(createBaseServerOptions().setLogActivity(true));
    TestLoggerFactory factory = testLogging();
    if (this instanceof Http1xTest) {
        assertTrue(factory.hasName("io.netty.handler.logging.LoggingHandler"));
    } else {
        assertTrue(factory.hasName("io.netty.handler.codec.http2.Http2FrameLogger"));
    }
}
Also used : TestLoggerFactory(io.vertx.test.netty.TestLoggerFactory) Test(org.junit.Test)

Example 24 with TestLoggerFactory

use of io.vertx.test.netty.TestLoggerFactory in project vert.x by eclipse.

the class NetTest method testClientLogging.

@Test
public void testClientLogging() throws Exception {
    client.close();
    client = vertx.createNetClient(new NetClientOptions().setLogActivity(true));
    TestLoggerFactory factory = testLogging();
    assertTrue(factory.hasName("io.netty.handler.logging.LoggingHandler"));
}
Also used : TestLoggerFactory(io.vertx.test.netty.TestLoggerFactory) Test(org.junit.Test)

Aggregations

TestLoggerFactory (io.vertx.test.netty.TestLoggerFactory)24 Test (org.junit.Test)21 InternalLoggerFactory (io.netty.util.internal.logging.InternalLoggerFactory)4 DatagramSocketOptions (io.vertx.core.datagram.DatagramSocketOptions)3 Buffer (io.vertx.core.buffer.Buffer)2 DnsClientOptions (io.vertx.core.dns.DnsClientOptions)2 io.vertx.core (io.vertx.core)1 Message (io.vertx.core.eventbus.Message)1 MessageConsumer (io.vertx.core.eventbus.MessageConsumer)1 ClientAuth (io.vertx.core.http.ClientAuth)1 io.vertx.core.impl (io.vertx.core.impl)1 JsonArray (io.vertx.core.json.JsonArray)1 JsonObject (io.vertx.core.json.JsonObject)1 Logger (io.vertx.core.logging.Logger)1 LoggerFactory (io.vertx.core.logging.LoggerFactory)1 io.vertx.core.net (io.vertx.core.net)1 SocketAddressImpl (io.vertx.core.net.impl.SocketAddressImpl)1 ReadStream (io.vertx.core.streams.ReadStream)1 TestUtils.assertIllegalArgumentException (io.vertx.test.core.TestUtils.assertIllegalArgumentException)1 TestUtils.assertNullPointerException (io.vertx.test.core.TestUtils.assertNullPointerException)1