diff --git a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteAcceptorChannelTest.java b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteAcceptorChannelTest.java index 1d0f3a36ed..1910600346 100644 --- a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteAcceptorChannelTest.java +++ b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteAcceptorChannelTest.java @@ -18,25 +18,17 @@ package io.netty.test.udt.nio; import io.netty.buffer.BufType; import io.netty.channel.udt.nio.NioUdtByteAcceptorChannel; - import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.Assert.*; public class NioUdtByteAcceptorChannelTest extends AbstractUdtTest { - protected static final Logger log = LoggerFactory.getLogger(NioUdtByteAcceptorChannelTest.class); - /** * verify channel meta data */ @Test public void metadata() throws Exception { - - assertEquals(BufType.BYTE, new NioUdtByteAcceptorChannel().metadata() - .bufferType()); - + assertEquals(BufType.BYTE, new NioUdtByteAcceptorChannel().metadata().bufferType()); } } diff --git a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteConnectorChannelTest.java b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteConnectorChannelTest.java index 47edf48cf1..45c197bc86 100644 --- a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteConnectorChannelTest.java +++ b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteConnectorChannelTest.java @@ -18,26 +18,17 @@ package io.netty.test.udt.nio; import io.netty.buffer.BufType; import io.netty.channel.udt.nio.NioUdtByteConnectorChannel; - import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.Assert.*; public class NioUdtByteConnectorChannelTest extends AbstractUdtTest { - protected static final Logger log = LoggerFactory.getLogger(NioUdtByteAcceptorChannelTest.class); - /** * verify channel meta data */ @Test public void metadata() throws Exception { - - assertEquals(BufType.BYTE, new NioUdtByteConnectorChannel().metadata() - .bufferType()); - + assertEquals(BufType.BYTE, new NioUdtByteConnectorChannel().metadata().bufferType()); } - } diff --git a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteRendezvousChannelTest.java b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteRendezvousChannelTest.java index ea1f2ef852..a572dc84c6 100644 --- a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteRendezvousChannelTest.java +++ b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtByteRendezvousChannelTest.java @@ -22,13 +22,12 @@ import io.netty.bootstrap.Bootstrap; import io.netty.buffer.BufType; import io.netty.channel.ChannelFuture; import io.netty.channel.udt.nio.NioUdtByteRendezvousChannel; +import io.netty.logging.InternalLogger; +import io.netty.logging.InternalLoggerFactory; import io.netty.test.udt.util.BootHelp; import io.netty.test.udt.util.EchoByteHandler; import io.netty.test.udt.util.UnitHelp; - import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.net.InetSocketAddress; import java.util.concurrent.TimeUnit; @@ -37,17 +36,14 @@ import static org.junit.Assert.*; public class NioUdtByteRendezvousChannelTest extends AbstractUdtTest { - protected static final Logger log = LoggerFactory.getLogger(NioUdtByteAcceptorChannelTest.class); + private static final InternalLogger log = InternalLoggerFactory.getInstance(NioUdtByteAcceptorChannelTest.class); /** * verify channel meta data */ @Test public void metadata() throws Exception { - - assertEquals(BufType.BYTE, new NioUdtByteRendezvousChannel().metadata() - .bufferType()); - + assertEquals(BufType.BYTE, new NioUdtByteRendezvousChannel().metadata().bufferType()); } /** @@ -82,7 +78,7 @@ public class NioUdtByteRendezvousChannelTest extends AbstractUdtTest { while (handler1.meter().count() < transferLimit && handler2.meter().count() < transferLimit) { - NioUdtByteAcceptorChannelTest.log.info("progress : {} {}", handler1.meter().count(), handler2 + log.info("progress : {} {}", handler1.meter().count(), handler2 .meter().count()); Thread.sleep(1000); @@ -92,8 +88,8 @@ public class NioUdtByteRendezvousChannelTest extends AbstractUdtTest { connectFuture1.channel().close().sync(); connectFuture2.channel().close().sync(); - NioUdtByteAcceptorChannelTest.log.info("handler1 : {}", handler1.meter().count()); - NioUdtByteAcceptorChannelTest.log.info("handler2 : {}", handler2.meter().count()); + log.info("handler1 : {}", handler1.meter().count()); + log.info("handler2 : {}", handler2.meter().count()); assertTrue(handler1.meter().count() >= transferLimit); assertTrue(handler2.meter().count() >= transferLimit); diff --git a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageAcceptorChannelTest.java b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageAcceptorChannelTest.java index ebfc00fdd0..e7bdfe8089 100644 --- a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageAcceptorChannelTest.java +++ b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageAcceptorChannelTest.java @@ -18,26 +18,17 @@ package io.netty.test.udt.nio; import io.netty.buffer.BufType; import io.netty.channel.udt.nio.NioUdtMessageAcceptorChannel; - import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.Assert.*; public class NioUdtMessageAcceptorChannelTest extends AbstractUdtTest { - protected static final Logger log = LoggerFactory.getLogger(NioUdtByteAcceptorChannelTest.class); - /** * verify channel meta data */ @Test public void metadata() throws Exception { - - assertEquals(BufType.MESSAGE, new NioUdtMessageAcceptorChannel() - .metadata().bufferType()); - + assertEquals(BufType.MESSAGE, new NioUdtMessageAcceptorChannel().metadata().bufferType()); } - } diff --git a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageConnectorChannelTest.java b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageConnectorChannelTest.java index f26710b448..4d5d7fe473 100644 --- a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageConnectorChannelTest.java +++ b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageConnectorChannelTest.java @@ -18,26 +18,17 @@ package io.netty.test.udt.nio; import io.netty.buffer.BufType; import io.netty.channel.udt.nio.NioUdtMessageConnectorChannel; - import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.Assert.*; public class NioUdtMessageConnectorChannelTest extends AbstractUdtTest { - protected static final Logger log = LoggerFactory.getLogger(NioUdtByteAcceptorChannelTest.class); - /** * verify channel meta data */ @Test public void metadata() throws Exception { - - assertEquals(BufType.MESSAGE, new NioUdtMessageConnectorChannel() - .metadata().bufferType()); - + assertEquals(BufType.MESSAGE, new NioUdtMessageConnectorChannel().metadata().bufferType()); } - } diff --git a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageRendezvousChannelTest.java b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageRendezvousChannelTest.java index 78faf88317..f042a7d057 100644 --- a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageRendezvousChannelTest.java +++ b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtMessageRendezvousChannelTest.java @@ -22,13 +22,12 @@ import io.netty.bootstrap.Bootstrap; import io.netty.buffer.BufType; import io.netty.channel.ChannelFuture; import io.netty.channel.udt.nio.NioUdtMessageRendezvousChannel; +import io.netty.logging.InternalLogger; +import io.netty.logging.InternalLoggerFactory; import io.netty.test.udt.util.BootHelp; import io.netty.test.udt.util.EchoMessageHandler; import io.netty.test.udt.util.UnitHelp; - import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.net.InetSocketAddress; import java.util.concurrent.TimeUnit; @@ -37,16 +36,14 @@ import static org.junit.Assert.*; public class NioUdtMessageRendezvousChannelTest extends AbstractUdtTest { - protected static final Logger log = LoggerFactory.getLogger(NioUdtByteAcceptorChannelTest.class); + private static final InternalLogger log = InternalLoggerFactory.getInstance(NioUdtByteAcceptorChannelTest.class); /** * verify channel meta data */ @Test public void metadata() throws Exception { - - assertEquals(BufType.MESSAGE, new NioUdtMessageRendezvousChannel() - .metadata().bufferType()); + assertEquals(BufType.MESSAGE, new NioUdtMessageRendezvousChannel().metadata().bufferType()); } @@ -86,7 +83,7 @@ public class NioUdtMessageRendezvousChannelTest extends AbstractUdtTest { while (handler1.meter().count() < transferLimit && handler2.meter().count() < transferLimit) { - NioUdtByteAcceptorChannelTest.log.info("progress : {} {}", handler1.meter().count(), handler2 + log.info("progress : {} {}", handler1.meter().count(), handler2 .meter().count()); Thread.sleep(1000); @@ -96,8 +93,8 @@ public class NioUdtMessageRendezvousChannelTest extends AbstractUdtTest { connectFuture1.channel().close().sync(); connectFuture2.channel().close().sync(); - NioUdtByteAcceptorChannelTest.log.info("handler1 : {}", handler1.meter().count()); - NioUdtByteAcceptorChannelTest.log.info("handler2 : {}", handler2.meter().count()); + log.info("handler1 : {}", handler1.meter().count()); + log.info("handler2 : {}", handler2.meter().count()); assertTrue(handler1.meter().count() >= transferLimit); assertTrue(handler2.meter().count() >= transferLimit); diff --git a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtProviderTest.java b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtProviderTest.java index ee0879616a..e46b6eb6e3 100644 --- a/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtProviderTest.java +++ b/transport-udt/src/test/java/io/netty/test/udt/nio/NioUdtProviderTest.java @@ -18,23 +18,17 @@ package io.netty.test.udt.nio; import io.netty.channel.udt.UdtServerChannel; import io.netty.channel.udt.nio.NioUdtProvider; - import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.Assert.*; public class NioUdtProviderTest extends AbstractUdtTest { - protected static final Logger log = LoggerFactory.getLogger(NioUdtProviderTest.class); - /** * verify factory */ @Test public void provideFactory() { - // bytes assertNotNull(NioUdtProvider.BYTE_ACCEPTOR.newChannel()); assertNotNull(NioUdtProvider.BYTE_CONNECTOR.newChannel()); @@ -48,7 +42,5 @@ public class NioUdtProviderTest extends AbstractUdtTest { // acceptor types assertTrue(NioUdtProvider.BYTE_ACCEPTOR.newChannel() instanceof UdtServerChannel); assertTrue(NioUdtProvider.MESSAGE_ACCEPTOR.newChannel() instanceof UdtServerChannel); - } - }