Skip to content

Commit 1f99048

Browse files
committed
wip
1 parent 54f8cac commit 1f99048

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/main/java/org/scalasbt/ipcsocket/SocketChannels.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ public static ByteBuffer readAll(SocketChannel channel, int readTimeoutMillis)
146146
numOfKeys = sel.select(readTimeoutMillis);
147147
}
148148
} else {
149-
if (readTimeoutMillis > 0) {
150-
throw new IOException("timeout requires JDK 17 and non-Windows");
151-
}
149+
// if (readTimeoutMillis > 0) {
150+
// throw new IOException("timeout requires JDK 17 and non-Windows");
151+
// }
152152
// The following operation gets blocked on JDK 8
153153
// channel.register(sel, SelectionKey.OP_READ);
154154
// numOfKeys = sel.select(readTimeoutMilis);

src/test/java/org/scalasbt/ipcsocket/SocketChannelTest.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ public void testNonBlockingEchoServer() throws IOException, InterruptedException
2121
"SocketChannelTest#testNonBlockingEchoServer(" + Boolean.toString(useJNI()) + ")");
2222
withSocket(
2323
sock -> {
24-
if (isJava17Plus() || ServerSocketChannels.isWin) {
25-
String line = nonBlockingEchoServerTest(sock, 100, 600);
26-
assertEquals("echo did not return the content", "hello", line);
27-
}
24+
String line = nonBlockingEchoServerTest(sock, 100, 600);
25+
assertEquals("echo did not return the content", "hello", line);
2826
});
2927
}
3028

@@ -34,10 +32,8 @@ public void testTimeout() throws IOException, InterruptedException {
3432
System.out.println("SocketChannelTest#testTimeout(" + Boolean.toString(useJNI()) + ")");
3533
withSocket(
3634
sock -> {
37-
if (isJava17Plus() && !ServerSocketChannels.isWin) {
38-
String line = nonBlockingEchoServerTest(sock, 6000, 600);
39-
assertEquals("echo did not timeout", "<unavailable>", line);
40-
}
35+
String line = nonBlockingEchoServerTest(sock, 6000, 600);
36+
assertEquals("echo did not timeout", "<unavailable>", line);
4137
});
4238
}
4339

0 commit comments

Comments
 (0)