diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioClientSocketShutdownTimeTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioClientSocketShutdownTimeTest.java deleted file mode 100644 index 53fe8b3d95..0000000000 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioClientSocketShutdownTimeTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2011 The Netty Project - * - * The Netty Project licenses this file to you under the Apache License, - * version 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package io.netty.testsuite.transport.socket.nio; - -import static org.junit.Assert.*; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.nio.channels.ServerSocketChannel; -import java.util.concurrent.Executors; - -import org.junit.Test; - -import io.netty.bootstrap.ClientBootstrap; -import io.netty.channel.ChannelFuture; -import io.netty.channel.socket.nio.NioClientSocketChannelFactory; -import io.netty.testsuite.util.DummyHandler; -import io.netty.util.SocketAddresses; - -public class NioClientSocketShutdownTimeTest { - - @Test - public void testShutdownTime() throws Throwable { - ServerSocketChannel serverSocket = ServerSocketChannel.open(); - serverSocket.socket().bind(new InetSocketAddress(0)); - - ClientBootstrap b = new ClientBootstrap( - new NioClientSocketChannelFactory(Executors.newCachedThreadPool())); - b.pipeline().addLast("handler", new DummyHandler()); - - long startTime; - long stopTime; - - try { - serverSocket.configureBlocking(false); - - ChannelFuture f = b.connect(new InetSocketAddress( - SocketAddresses.LOCALHOST, - serverSocket.socket().getLocalPort())); - - serverSocket.accept(); - f.awaitUninterruptibly(); - - if (f.cause() != null) { - throw f.cause(); - } - assertTrue(f.isSuccess()); - - startTime = System.currentTimeMillis(); - - f.channel().close().awaitUninterruptibly(); - } finally { - b.getFactory().releaseExternalResources(); - - stopTime = System.currentTimeMillis(); - - try { - serverSocket.close(); - } catch (IOException ex) { - // Ignore. - } - } - - long shutdownTime = stopTime - startTime; - assertTrue("Shutdown takes too long: " + shutdownTime + " ms", shutdownTime < 500); - } -} diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioServerSocketShutdownTimeTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioServerSocketShutdownTimeTest.java deleted file mode 100644 index 229231fc95..0000000000 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioServerSocketShutdownTimeTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2011 The Netty Project - * - * The Netty Project licenses this file to you under the Apache License, - * version 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package io.netty.testsuite.transport.socket.nio; - -import static org.junit.Assert.*; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.net.Socket; -import java.util.concurrent.Executors; - -import io.netty.bootstrap.ServerBootstrap; -import io.netty.channel.Channel; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelStateEvent; -import io.netty.channel.SimpleChannelUpstreamHandler; -import io.netty.channel.socket.nio.NioServerSocketChannelFactory; -import io.netty.util.SocketAddresses; -import org.junit.Test; - -public class NioServerSocketShutdownTimeTest { - - @Test(timeout = 10000) - public void testSuccessfulBindAttempt() throws Exception { - ServerBootstrap bootstrap = new ServerBootstrap( - new NioServerSocketChannelFactory(Executors.newCachedThreadPool())); - - bootstrap.setOption("localAddress", new InetSocketAddress(0)); - bootstrap.setOption("child.receiveBufferSize", 9753); - bootstrap.setOption("child.sendBufferSize", 8642); - - DummyHandler handler = new DummyHandler(); - bootstrap.pipeline().addLast("dummy", handler); - - Channel channel = bootstrap.bind(); - - final long startTime; - - Socket socket = null; - try { - socket = new Socket( - SocketAddresses.LOCALHOST, - ((InetSocketAddress) channel.getLocalAddress()).getPort()); - - while (!handler.connected) { - Thread.yield(); - } - - socket.close(); - - while (!handler.closed) { - Thread.yield(); - } - } finally { - if (socket != null) { - try { - socket.close(); - } catch (IOException e) { - // Ignore. - } - } - - startTime = System.currentTimeMillis(); - channel.close().awaitUninterruptibly(); - bootstrap.getFactory().releaseExternalResources(); - } - - long shutdownTime = System.currentTimeMillis() - startTime; - assertTrue("Shutdown takes too long: " + shutdownTime + " ms", shutdownTime < 500); - } - - private static class DummyHandler extends SimpleChannelUpstreamHandler { - volatile boolean connected; - volatile boolean closed; - - DummyHandler() { - } - - @Override - public void channelConnected(ChannelHandlerContext ctx, - ChannelStateEvent e) throws Exception { - connected = true; - } - - @Override - public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) - throws Exception { - closed = true; - } - } -} diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioSocketClientBootstrapTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioSocketClientBootstrapTest.java deleted file mode 100644 index debd1618d7..0000000000 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioSocketClientBootstrapTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2011 The Netty Project - * - * The Netty Project licenses this file to you under the Apache License, - * version 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package io.netty.testsuite.transport.socket.nio; - -import java.util.concurrent.Executor; - -import io.netty.channel.ChannelFactory; -import io.netty.channel.socket.nio.NioClientSocketChannelFactory; -import io.netty.testsuite.transport.socket.AbstractSocketClientBootstrapTest; - -/** - * A test for New I/O socket client bootstraps - */ -public class NioSocketClientBootstrapTest extends - AbstractSocketClientBootstrapTest { - - /** - * Creates a new New I/O client socket channel factory - * - * @param executor The executor to use - */ - @Override - protected ChannelFactory newClientSocketChannelFactory(Executor executor) { - return new NioClientSocketChannelFactory(executor); - } -} diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioSocketServerBootstrapTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioSocketServerBootstrapTest.java deleted file mode 100644 index a9dbda9f68..0000000000 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/NioSocketServerBootstrapTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2011 The Netty Project - * - * The Netty Project licenses this file to you under the Apache License, - * version 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package io.netty.testsuite.transport.socket.nio; - -import java.util.concurrent.Executor; - -import io.netty.channel.ChannelFactory; -import io.netty.channel.socket.nio.NioServerSocketChannelFactory; -import io.netty.testsuite.transport.socket.AbstractSocketServerBootstrapTest; - -/** - * A test for New I/O socket server bootstraps - */ -public class NioSocketServerBootstrapTest extends - AbstractSocketServerBootstrapTest { - - /** - * Creates a new New I/O server socket channel factory - * - * @param executor The executor to use - */ - @Override - protected ChannelFactory newServerSocketChannelFactory(Executor executor) { - return new NioServerSocketChannelFactory(executor); - } -} diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/UdpClient.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/UdpClient.java deleted file mode 100644 index 09c7847ce2..0000000000 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/UdpClient.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2011 The Netty Project - * - * The Netty Project licenses this file to you under the Apache License, - * version 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package io.netty.testsuite.transport.socket.nio; - -import java.io.IOException; -import java.net.DatagramPacket; -import java.net.DatagramSocket; -import java.net.InetAddress; -import java.net.SocketException; - -/** - * A UDP (User Datagram Protocol) client for use in testing - */ -public class UdpClient { - - /** - * The internet address which is the target of this client - */ - private final InetAddress address; - - /** - * The datagram socket used by this client - */ - private final DatagramSocket clientSocket; - - /** - * The destination port used by this client - */ - private final int port; - - /** - * Creates a new UDP client - * - * @param address The target address to use - * @param port The target port to use - */ - public UdpClient(final InetAddress address, final int port) - throws SocketException { - //Set the address - this.address = address; - //Set the port - this.port = port; - //Set up a new datagram socket - clientSocket = new DatagramSocket(); - //And allow addresses to be reused - clientSocket.setReuseAddress(true); - } - - /** - * Sends a packet - * - * @param payload The payload of bytes to send - * @return The datagram packet sent - */ - public void send(final byte[] payload) throws IOException { - final DatagramPacket dp = - new DatagramPacket(payload, payload.length, address, port); - clientSocket.send(dp); - } - - /** - * Receives data from a datagram packet - * - * @param dp The datagram packet to use - * @param timeout The timeout to use - */ - public void receive(final DatagramPacket dp, final int timeout) throws IOException { - clientSocket.setSoTimeout(timeout); - clientSocket.receive(dp); - } - - /** - * Close this client and the socket it uses - */ - public void close() { - clientSocket.close(); - } -} diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketCompatibleObjectStreamEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketCompatibleObjectStreamEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketCompatibleObjectStreamEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketCompatibleObjectStreamEchoTest.java index 02699ed9cf..e09e3ce613 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketCompatibleObjectStreamEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketCompatibleObjectStreamEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.nio.nio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioClientSocketChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketCompatibleObjectStreamEchoTest; public class NioNioSocketCompatibleObjectStreamEchoTest extends AbstractSocketCompatibleObjectStreamEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketFixedLengthEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketFixedLengthEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketFixedLengthEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketFixedLengthEchoTest.java index 20cebacb42..2313edcd50 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketFixedLengthEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketFixedLengthEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.nio.nio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioClientSocketChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketFixedLengthEchoTest; public class NioNioSocketFixedLengthEchoTest extends AbstractSocketFixedLengthEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketObjectStreamEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketObjectStreamEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketObjectStreamEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketObjectStreamEchoTest.java index 003b3b5488..514c8dc99d 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketObjectStreamEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketObjectStreamEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.nio.nio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioClientSocketChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketObjectStreamEchoTest; public class NioNioSocketObjectStreamEchoTest extends AbstractSocketObjectStreamEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketStringEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketStringEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketStringEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketStringEchoTest.java index f56914e183..3b777ba076 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioNioSocketStringEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/nio/NioNioSocketStringEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.nio.nio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioClientSocketChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketStringEchoTest; public class NioNioSocketStringEchoTest extends AbstractSocketStringEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketCompatibleObjectStreamEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketCompatibleObjectStreamEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketCompatibleObjectStreamEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketCompatibleObjectStreamEchoTest.java index 69921991d6..c3a01cad6c 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketCompatibleObjectStreamEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketCompatibleObjectStreamEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.nio.oio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioClientSocketChannelFactory; import io.netty.channel.socket.oio.OioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketCompatibleObjectStreamEchoTest; public class NioOioSocketCompatibleObjectStreamEchoTest extends AbstractSocketCompatibleObjectStreamEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketFixedLengthEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketFixedLengthEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketFixedLengthEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketFixedLengthEchoTest.java index 1f51b70d4e..e2bf93ec36 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketFixedLengthEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketFixedLengthEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.nio.oio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioClientSocketChannelFactory; import io.netty.channel.socket.oio.OioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketFixedLengthEchoTest; public class NioOioSocketFixedLengthEchoTest extends AbstractSocketFixedLengthEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketObjectStreamEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketObjectStreamEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketObjectStreamEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketObjectStreamEchoTest.java index 6469c844e4..21a71b3fb2 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketObjectStreamEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketObjectStreamEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.nio.oio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioClientSocketChannelFactory; import io.netty.channel.socket.oio.OioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketObjectStreamEchoTest; public class NioOioSocketObjectStreamEchoTest extends AbstractSocketObjectStreamEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketStringEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketStringEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketStringEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketStringEchoTest.java index 60c471886c..832902ff0c 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/NioOioSocketStringEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/nio/oio/NioOioSocketStringEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.nio.oio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioClientSocketChannelFactory; import io.netty.channel.socket.oio.OioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketStringEchoTest; public class NioOioSocketStringEchoTest extends AbstractSocketStringEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/OioSocketClientBootstrapTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/OioSocketClientBootstrapTest.java deleted file mode 100644 index dc965f9b69..0000000000 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/OioSocketClientBootstrapTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2011 The Netty Project - * - * The Netty Project licenses this file to you under the Apache License, - * version 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package io.netty.testsuite.transport.socket.oio; - -import java.util.concurrent.Executor; - -import io.netty.channel.ChannelFactory; -import io.netty.channel.socket.oio.OioClientSocketChannelFactory; -import io.netty.testsuite.transport.socket.AbstractSocketClientBootstrapTest; - -/** - * A test for "Old" I/O socket client bootstraps - */ -public class OioSocketClientBootstrapTest extends - AbstractSocketClientBootstrapTest { - - /** - * Creates a new "Old" I/O client socket channel factory - * - * @param executor The executor to use - */ - @Override - protected ChannelFactory newClientSocketChannelFactory(Executor executor) { - return new OioClientSocketChannelFactory(executor); - } -} diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/OioSocketServerBootstrapTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/OioSocketServerBootstrapTest.java deleted file mode 100644 index 47da2f6660..0000000000 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/OioSocketServerBootstrapTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2011 The Netty Project - * - * The Netty Project licenses this file to you under the Apache License, - * version 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package io.netty.testsuite.transport.socket.oio; - -import java.util.concurrent.Executor; - -import io.netty.channel.ChannelFactory; -import io.netty.channel.socket.oio.OioServerSocketChannelFactory; -import io.netty.testsuite.transport.socket.AbstractSocketServerBootstrapTest; - -/** - * A socket server bootstrap test for "Old" I/O - */ -public class OioSocketServerBootstrapTest extends - AbstractSocketServerBootstrapTest { - - /** - * Creates a new "Old" I/O server socket channel factory - * - * @param executor The executor to use - */ - @Override - protected ChannelFactory newServerSocketChannelFactory(Executor executor) { - return new OioServerSocketChannelFactory(executor, executor); - } -} diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketCompatibleObjectStreamEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketCompatibleObjectStreamEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketCompatibleObjectStreamEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketCompatibleObjectStreamEchoTest.java index ab1305ee10..7c0953fcd5 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketCompatibleObjectStreamEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketCompatibleObjectStreamEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.oio.nio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory; import io.netty.channel.socket.oio.OioClientSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketCompatibleObjectStreamEchoTest; public class OioNioSocketCompatibleObjectStreamEchoTest extends AbstractSocketCompatibleObjectStreamEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketFixedLengthEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketFixedLengthEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketFixedLengthEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketFixedLengthEchoTest.java index 5115320110..94674e3f79 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketFixedLengthEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketFixedLengthEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.oio.nio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory; import io.netty.channel.socket.oio.OioClientSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketFixedLengthEchoTest; public class OioNioSocketFixedLengthEchoTest extends AbstractSocketFixedLengthEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketObjectStreamEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketObjectStreamEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketObjectStreamEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketObjectStreamEchoTest.java index 01fdf466c6..685ef4814a 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketObjectStreamEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketObjectStreamEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.oio.nio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory; import io.netty.channel.socket.oio.OioClientSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketObjectStreamEchoTest; /** */ diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketStringEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketStringEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketStringEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketStringEchoTest.java index 43be81a7e0..805c666374 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioNioSocketStringEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/nio/OioNioSocketStringEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.oio.nio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.nio.NioServerSocketChannelFactory; import io.netty.channel.socket.oio.OioClientSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketStringEchoTest; public class OioNioSocketStringEchoTest extends AbstractSocketStringEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketCompatibleObjectStreamEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketCompatibleObjectStreamEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketCompatibleObjectStreamEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketCompatibleObjectStreamEchoTest.java index 2b0203d52e..9b68265223 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketCompatibleObjectStreamEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketCompatibleObjectStreamEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.oio.oio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.oio.OioClientSocketChannelFactory; import io.netty.channel.socket.oio.OioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketCompatibleObjectStreamEchoTest; public class OioOioSocketCompatibleObjectStreamEchoTest extends AbstractSocketCompatibleObjectStreamEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketFixedLengthEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketFixedLengthEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketFixedLengthEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketFixedLengthEchoTest.java index fc664d124e..bb82548ab7 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketFixedLengthEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketFixedLengthEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.oio.oio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.oio.OioClientSocketChannelFactory; import io.netty.channel.socket.oio.OioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketFixedLengthEchoTest; public class OioOioSocketFixedLengthEchoTest extends AbstractSocketFixedLengthEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketObjectStreamEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketObjectStreamEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketObjectStreamEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketObjectStreamEchoTest.java index c6318ca98f..aef8d530bb 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketObjectStreamEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketObjectStreamEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.oio.oio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.oio.OioClientSocketChannelFactory; import io.netty.channel.socket.oio.OioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketObjectStreamEchoTest; public class OioOioSocketObjectStreamEchoTest extends AbstractSocketObjectStreamEchoTest { diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketStringEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketStringEchoTest.java similarity index 90% rename from testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketStringEchoTest.java rename to testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketStringEchoTest.java index 50e785388c..9e3a8b4894 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/OioOioSocketStringEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/oio/oio/OioOioSocketStringEchoTest.java @@ -13,13 +13,14 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.testsuite.transport.socket; +package io.netty.testsuite.transport.socket.oio.oio; import java.util.concurrent.Executor; import io.netty.channel.ChannelFactory; import io.netty.channel.socket.oio.OioClientSocketChannelFactory; import io.netty.channel.socket.oio.OioServerSocketChannelFactory; +import io.netty.testsuite.transport.socket.AbstractSocketStringEchoTest; public class OioOioSocketStringEchoTest extends AbstractSocketStringEchoTest {