GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove OIO transport (#15885) · netty/netty@41e4a4d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • testsuite/src/main/java/io/netty/testsuite/transport
    • sctp
      • SctpTestPermutation.java
    • socket
      • DatagramConnectNotExistsTest.java
      • DatagramMulticastTest.java
      • SocketConnectionAttemptTest.java
      • SocketHalfClosedTest.java
      • SocketShutdownOutputBySelfTest.java
      • SocketTestPermutation.java
  • transport-sctp/src
    • main/java/io/netty/channel/sctp/oio
      • OioSctpChannel.java
      • OioSctpServerChannel.java
      • package-info.java
    • test/java/io/netty/channel/sctp/oio
      • OioSctpLimitStreamsTest.java
  • transport/src
    • main/java/io/netty/channel
      • ThreadPerChannelEventLoop.java
      • ThreadPerChannelEventLoopGroup.java
      • oio
        • AbstractOioByteChannel.java
        • AbstractOioChannel.java
        • AbstractOioMessageChannel.java
        • OioByteStreamChannel.java
        • OioEventLoopGroup.java
        • package-info.java
      • socket/oio
        • DefaultOioDatagramChannelConfig.java
        • DefaultOioServerSocketChannelConfig.java
        • DefaultOioSocketChannelConfig.java
        • OioDatagramChannel.java
        • OioDatagramChannelConfig.java
        • OioServerSocketChannel.java
        • OioServerSocketChannelConfig.java
        • OioSocketChannel.java
        • OioSocketChannelConfig.java
        • package-info.java
    • test/java/io/netty/channel
      • DefaultChannelPipelineTest.java
      • ThreadPerChannelEventLoopGroupTest.java
      • oio
        • OioEventLoopTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎testsuite/src/main/java/io/netty/testsuite/transport/sctp/SctpTestPermutation.java‎

Copy file name to clipboardExpand all lines: testsuite/src/main/java/io/netty/testsuite/transport/sctp/SctpTestPermutation.java
-19Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
import io.netty.channel.EventLoopGroup;
2121
import io.netty.channel.MultiThreadIoEventLoopGroup;
2222
import io.netty.channel.nio.NioIoHandler;
23-
import io.netty.channel.oio.OioEventLoopGroup;
2423
import io.netty.channel.sctp.nio.NioSctpChannel;
2524
import io.netty.channel.sctp.nio.NioSctpServerChannel;
26-
import io.netty.channel.sctp.oio.OioSctpChannel;
27-
import io.netty.channel.sctp.oio.OioSctpServerChannel;
2825
import io.netty.testsuite.util.TestUtils;
2926
import io.netty.testsuite.transport.TestsuitePermutation.BootstrapComboFactory;
3027
import io.netty.testsuite.transport.TestsuitePermutation.BootstrapFactory;
@@ -39,8 +36,6 @@ public final class SctpTestPermutation {
3936
private static final int NUM_THREADS = 4;
4037
private static final EventLoopGroup NIO_GROUP = new MultiThreadIoEventLoopGroup(
4138
NUM_THREADS, new DefaultThreadFactory("testsuite-sctp-nio", true), NioIoHandler.newFactory());
42-
private static final EventLoopGroup OIO_GROUP =
43-
new OioEventLoopGroup(Integer.MAX_VALUE, new DefaultThreadFactory("testsuite-sctp-oio-worker", true));
4439

4540
static List<BootstrapFactory<ServerBootstrap>> sctpServerChannel() {
4641
if (!TestUtils.isSctpSupported()) {
@@ -57,14 +52,6 @@ public ServerBootstrap newInstance() {
5752
channel(NioSctpServerChannel.class);
5853
}
5954
});
60-
list.add(new BootstrapFactory<ServerBootstrap>() {
61-
@Override
62-
public ServerBootstrap newInstance() {
63-
return new ServerBootstrap().
64-
group(OIO_GROUP).
65-
channel(OioSctpServerChannel.class);
66-
}
67-
});
6855

6956
return list;
7057
}
@@ -81,12 +68,6 @@ public Bootstrap newInstance() {
8168
return new Bootstrap().group(NIO_GROUP).channel(NioSctpChannel.class);
8269
}
8370
});
84-
list.add(new BootstrapFactory<Bootstrap>() {
85-
@Override
86-
public Bootstrap newInstance() {
87-
return new Bootstrap().group(OIO_GROUP).channel(OioSctpChannel.class);
88-
}
89-
});
9071
return list;
9172
}
9273

Collapse file

‎testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramConnectNotExistsTest.java‎

Copy file name to clipboardExpand all lines: testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramConnectNotExistsTest.java
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import io.netty.channel.ChannelFuture;
2222
import io.netty.channel.ChannelHandlerContext;
2323
import io.netty.channel.ChannelInboundHandlerAdapter;
24-
import io.netty.channel.socket.oio.OioDatagramChannel;
2524
import io.netty.testsuite.transport.TestsuitePermutation;
2625
import io.netty.util.CharsetUtil;
2726
import io.netty.util.NetUtil;
@@ -74,9 +73,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
7473
assertTrue(datagramChannel.isActive());
7574
datagramChannel.writeAndFlush(
7675
Unpooled.copiedBuffer("test", CharsetUtil.US_ASCII)).syncUninterruptibly();
77-
if (!(datagramChannel instanceof OioDatagramChannel)) {
78-
assertTrue(promise.syncUninterruptibly().getNow() instanceof PortUnreachableException);
79-
}
76+
assertTrue(promise.syncUninterruptibly().getNow() instanceof PortUnreachableException);
8077
} finally {
8178
future.channel().close();
8279
}
Collapse file

‎testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramMulticastTest.java‎

Copy file name to clipboardExpand all lines: testsuite/src/main/java/io/netty/testsuite/transport/socket/DatagramMulticastTest.java
+1-8Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import io.netty.channel.socket.DatagramChannel;
2626
import io.netty.channel.socket.DatagramPacket;
2727
import io.netty.channel.socket.SocketProtocolFamily;
28-
import io.netty.channel.socket.oio.OioDatagramChannel;
2928
import io.netty.testsuite.transport.TestsuitePermutation;
3029
import io.netty.util.NetUtil;
3130
import io.netty.util.internal.SocketUtils;
@@ -97,13 +96,7 @@ public boolean isSharable() {
9796
sc.close().sync();
9897
}
9998
sc = (DatagramChannel) sb.bind(newSocketAddress(iface)).sync().channel();
100-
if (sc instanceof OioDatagramChannel) {
101-
// skip the test for OIO, as it fails because of
102-
// No route to host which makes no sense.
103-
// Maybe a JDK bug ?
104-
sc.close().awaitUninterruptibly();
105-
return;
106-
}
99+
107100
assertEquals(iface, sc.config().getNetworkInterface());
108101
assertInterfaceAddress(iface, sc.config().getInterface());
109102

Collapse file

‎testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketConnectionAttemptTest.java‎

Copy file name to clipboardExpand all lines: testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketConnectionAttemptTest.java
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import io.netty.channel.ChannelHandlerContext;
2323
import io.netty.channel.ChannelInboundHandlerAdapter;
2424
import io.netty.channel.ChannelOption;
25-
import io.netty.channel.socket.oio.OioSocketChannel;
2625
import io.netty.util.internal.SocketUtils;
2726
import io.netty.util.NetUtil;
2827
import io.netty.util.concurrent.GlobalEventExecutor;
@@ -172,9 +171,8 @@ public void testConnectCancellation(Bootstrap cb) throws Throwable {
172171
}
173172
}
174173

175-
@SuppressWarnings("deprecation")
176174
protected boolean isConnectCancellationSupported(Channel channel) {
177-
return !(channel instanceof OioSocketChannel);
175+
return true;
178176
}
179177

180178
private static class TestHandler extends ChannelInboundHandlerAdapter {
Collapse file

‎testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketHalfClosedTest.java‎

Copy file name to clipboardExpand all lines: testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketHalfClosedTest.java
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import io.netty.channel.RecvByteBufAllocator;
3232
import io.netty.channel.SimpleChannelInboundHandler;
3333
import io.netty.channel.nio.NioIoHandler;
34-
import io.netty.channel.oio.OioEventLoopGroup;
3534
import io.netty.channel.socket.ChannelInputShutdownEvent;
3635
import io.netty.channel.socket.ChannelInputShutdownReadComplete;
3736
import io.netty.channel.socket.ChannelOutputShutdownEvent;
@@ -67,10 +66,7 @@ public void testAllDataReadEventTriggeredAfterHalfClosure(TestInfo testInfo) thr
6766
run(testInfo, new Runner<ServerBootstrap, Bootstrap>() {
6867
@Override
6968
public void run(ServerBootstrap serverBootstrap, Bootstrap bootstrap) throws Throwable {
70-
if (bootstrap.config().group() instanceof OioEventLoopGroup) {
71-
logger.debug("Ignoring test for incompatible OIO event system");
72-
return;
73-
} else if (bootstrap.config().group() instanceof IoEventLoopGroup) {
69+
if (bootstrap.config().group() instanceof IoEventLoopGroup) {
7470
IoEventLoopGroup group = (IoEventLoopGroup) bootstrap.config().group();
7571
if (group.isIoType(NioIoHandler.class)) {
7672
logger.debug("Ignoring test for incompatible NioHandler");
Collapse file

‎testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketShutdownOutputBySelfTest.java‎

Copy file name to clipboardExpand all lines: testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketShutdownOutputBySelfTest.java
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import io.netty.channel.SimpleChannelInboundHandler;
2626
import io.netty.channel.WriteBufferWaterMark;
2727
import io.netty.channel.socket.SocketChannel;
28-
import io.netty.channel.socket.oio.OioSocketChannel;
2928
import org.junit.jupiter.api.Disabled;
3029
import org.junit.jupiter.api.Test;
3130
import org.junit.jupiter.api.TestInfo;
@@ -47,7 +46,6 @@
4746
import static org.junit.jupiter.api.Assertions.assertNull;
4847
import static org.junit.jupiter.api.Assertions.assertTrue;
4948
import static org.junit.jupiter.api.Assertions.fail;
50-
import static org.junit.jupiter.api.Assumptions.assumeFalse;
5149

5250
public class SocketShutdownOutputBySelfTest extends AbstractClientSocketTest {
5351

@@ -168,7 +166,6 @@ public void testWriteAfterShutdownOutputNoWritabilityChange(Bootstrap cb) throws
168166
ss.bind(newSocketAddress());
169167
cb.option(ChannelOption.WRITE_BUFFER_WATER_MARK, new WriteBufferWaterMark(2, 4));
170168
ch = (SocketChannel) cb.handler(h).connect(ss.getLocalSocketAddress()).sync().channel();
171-
assumeFalse(ch instanceof OioSocketChannel);
172169
assertTrue(ch.isActive());
173170
assertFalse(ch.isOutputShutdown());
174171

Collapse file

‎testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketTestPermutation.java‎

Copy file name to clipboardExpand all lines: testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketTestPermutation.java
+1-59Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,13 @@
2020
import io.netty.bootstrap.ServerBootstrap;
2121
import io.netty.channel.Channel;
2222
import io.netty.channel.ChannelFactory;
23-
import io.netty.channel.ChannelOption;
2423
import io.netty.channel.EventLoopGroup;
2524
import io.netty.channel.MultiThreadIoEventLoopGroup;
2625
import io.netty.channel.nio.NioIoHandler;
27-
import io.netty.channel.oio.OioEventLoopGroup;
2826
import io.netty.channel.socket.SocketProtocolFamily;
2927
import io.netty.channel.socket.nio.NioDatagramChannel;
3028
import io.netty.channel.socket.nio.NioServerSocketChannel;
3129
import io.netty.channel.socket.nio.NioSocketChannel;
32-
import io.netty.channel.socket.oio.OioDatagramChannel;
33-
import io.netty.channel.socket.oio.OioServerSocketChannel;
34-
import io.netty.channel.socket.oio.OioSocketChannel;
3530
import io.netty.testsuite.transport.TestsuitePermutation.BootstrapComboFactory;
3631
import io.netty.testsuite.transport.TestsuitePermutation.BootstrapFactory;
3732
import io.netty.util.concurrent.DefaultThreadFactory;
@@ -46,7 +41,6 @@ public class SocketTestPermutation {
4641

4742
static final String BAD_HOST = SystemPropertyUtil.get("io.netty.testsuite.badHost", "198.51.100.254");
4843
static final int BAD_PORT = SystemPropertyUtil.getInt("io.netty.testsuite.badPort", 65535);
49-
static final boolean INCLUDE_OIO = SystemPropertyUtil.getBoolean("io.netty.testsuite.includeOio", false);
5044

5145
// See /etc/services
5246
public static final int UNASSIGNED_PORT = 4;
@@ -61,12 +55,8 @@ public class SocketTestPermutation {
6155

6256
protected static final int NUM_THREADS = 4;
6357

64-
protected static final int OIO_SO_TIMEOUT = 10; // Use short timeout for faster runs.
65-
6658
protected final EventLoopGroup NIO_GROUP = new MultiThreadIoEventLoopGroup(
6759
NUM_THREADS, new DefaultThreadFactory("testsuite-nio", true), NioIoHandler.newFactory());
68-
protected final EventLoopGroup OIO_GROUP =
69-
new OioEventLoopGroup(Integer.MAX_VALUE, new DefaultThreadFactory("testsuite-oio", true));
7060

7161
protected <A extends AbstractBootstrap<?, ?>, B extends AbstractBootstrap<?, ?>>
7262

@@ -106,11 +96,6 @@ public List<BootstrapComboFactory<ServerBootstrap, Bootstrap>> socket() {
10696
// Populate the combinations
10797
List<BootstrapComboFactory<ServerBootstrap, Bootstrap>> list = combo(sbfs, cbfs);
10898

109-
if (INCLUDE_OIO) {
110-
// Remove the OIO-OIO case which often leads to a dead lock by its nature.
111-
list.remove(list.size() - 1);
112-
}
113-
11499
return list;
115100
}
116101

@@ -124,11 +109,6 @@ public List<BootstrapComboFactory<ServerBootstrap, Bootstrap>> socketWithFastOpe
124109
// Populate the combinations
125110
List<BootstrapComboFactory<ServerBootstrap, Bootstrap>> list = combo(sbfs, cbfs);
126111

127-
if (INCLUDE_OIO) {
128-
// Remove the OIO-OIO case which often leads to a dead lock by its nature.
129-
list.remove(list.size() - 1);
130-
}
131-
132112
return list;
133113
}
134114

@@ -152,15 +132,6 @@ public String toString() {
152132
});
153133
}
154134
});
155-
if (INCLUDE_OIO) {
156-
bfs.add(new BootstrapFactory<Bootstrap>() {
157-
@Override
158-
public Bootstrap newInstance() {
159-
return new Bootstrap().group(OIO_GROUP).channel(OioDatagramChannel.class)
160-
.option(ChannelOption.SO_TIMEOUT, OIO_SO_TIMEOUT);
161-
}
162-
});
163-
}
164135

165136
// Populare the combinations.
166137
return combo(bfs, bfs);
@@ -175,17 +146,6 @@ public ServerBootstrap newInstance() {
175146
.channel(NioServerSocketChannel.class);
176147
}
177148
});
178-
if (INCLUDE_OIO) {
179-
factories.add(new BootstrapFactory<ServerBootstrap>() {
180-
@Override
181-
public ServerBootstrap newInstance() {
182-
return new ServerBootstrap().group(OIO_GROUP)
183-
.channel(OioServerSocketChannel.class)
184-
.option(ChannelOption.SO_TIMEOUT, OIO_SO_TIMEOUT);
185-
}
186-
});
187-
}
188-
189149
return factories;
190150
}
191151

@@ -197,15 +157,6 @@ public Bootstrap newInstance() {
197157
return new Bootstrap().group(NIO_GROUP).channel(NioSocketChannel.class);
198158
}
199159
});
200-
if (INCLUDE_OIO) {
201-
factories.add(new BootstrapFactory<Bootstrap>() {
202-
@Override
203-
public Bootstrap newInstance() {
204-
return new Bootstrap().group(OIO_GROUP).channel(OioSocketChannel.class)
205-
.option(ChannelOption.SO_TIMEOUT, OIO_SO_TIMEOUT);
206-
}
207-
});
208-
}
209160
return factories;
210161
}
211162

@@ -221,15 +172,6 @@ public Bootstrap newInstance() {
221172
return new Bootstrap().group(NIO_GROUP).channel(NioDatagramChannel.class);
222173
}
223174
});
224-
if (INCLUDE_OIO) {
225-
factories.add(new BootstrapFactory<Bootstrap>() {
226-
@Override
227-
public Bootstrap newInstance() {
228-
return new Bootstrap().group(OIO_GROUP).channel(OioDatagramChannel.class)
229-
.option(ChannelOption.SO_TIMEOUT, OIO_SO_TIMEOUT);
230-
}
231-
});
232-
}
233-
return factories;
175+
return factories;
234176
}
235177
}

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.