Loading src/test/java/ch15/ConceptsTest.java +6 −3 Changes for src/test/java/ch15/ConceptsTest.java: 6 added lines, 3 removed lines. Original line number Diff line number Diff line package ch15; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.ExecutionMode; import java.io.IOException; import java.io.Reader; Loading @@ -19,7 +22,7 @@ import java.util.concurrent.Executors; class ConceptsTest { @Test // This test doesn't pass or fail. I was using it to see if I could generate exceptions @Disabled("This test doesn't pass or fail. I was using it to see if I could generate exceptions") void testConnect() throws IOException { SocketAddress remote1 = new InetSocketAddress("127.0.0.1", 4242); Loading @@ -35,7 +38,7 @@ class ConceptsTest { @Test void testChannelPortNumbers() throws IOException { SocketAddress serverAddress = new InetSocketAddress("127.0.0.1", 3601); SocketAddress serverAddress = new InetSocketAddress("127.0.0.1", 3602); ServerSocketChannel serverSocketChannel = ServerSocketChannel.open(); serverSocketChannel.bind(serverAddress); Loading Loading @@ -66,7 +69,7 @@ class ConceptsTest { void testInputStreamsWithNonBlockingChannel() throws IOException, InterruptedException { ExecutorService executorService = Executors.newFixedThreadPool(2); CountDownLatch latch = new CountDownLatch(1); int serverPort = 3600; int serverPort = 3601; ServerSocketChannel server = ServerSocketChannel.open(); server.bind(new InetSocketAddress("localhost", serverPort)); executorService.submit(() -> { Loading src/test/java/ch15/SimpleChatServerTest.java +2 −0 Changes for src/test/java/ch15/SimpleChatServerTest.java: 2 added lines, 0 removed lines. Original line number Diff line number Diff line package ch15; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.io.BufferedReader; Loading @@ -14,6 +15,7 @@ import java.util.concurrent.Executors; import static org.junit.jupiter.api.Assertions.assertTrue; // Needs a SimpleChatServer running (is not a real unit test class, more like an integration test) @Disabled class SimpleChatServerTest { @Test void testSend() throws IOException { Loading Loading
src/test/java/ch15/ConceptsTest.java +6 −3 Changes for src/test/java/ch15/ConceptsTest.java: 6 added lines, 3 removed lines. Original line number Diff line number Diff line package ch15; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.ExecutionMode; import java.io.IOException; import java.io.Reader; Loading @@ -19,7 +22,7 @@ import java.util.concurrent.Executors; class ConceptsTest { @Test // This test doesn't pass or fail. I was using it to see if I could generate exceptions @Disabled("This test doesn't pass or fail. I was using it to see if I could generate exceptions") void testConnect() throws IOException { SocketAddress remote1 = new InetSocketAddress("127.0.0.1", 4242); Loading @@ -35,7 +38,7 @@ class ConceptsTest { @Test void testChannelPortNumbers() throws IOException { SocketAddress serverAddress = new InetSocketAddress("127.0.0.1", 3601); SocketAddress serverAddress = new InetSocketAddress("127.0.0.1", 3602); ServerSocketChannel serverSocketChannel = ServerSocketChannel.open(); serverSocketChannel.bind(serverAddress); Loading Loading @@ -66,7 +69,7 @@ class ConceptsTest { void testInputStreamsWithNonBlockingChannel() throws IOException, InterruptedException { ExecutorService executorService = Executors.newFixedThreadPool(2); CountDownLatch latch = new CountDownLatch(1); int serverPort = 3600; int serverPort = 3601; ServerSocketChannel server = ServerSocketChannel.open(); server.bind(new InetSocketAddress("localhost", serverPort)); executorService.submit(() -> { Loading
src/test/java/ch15/SimpleChatServerTest.java +2 −0 Changes for src/test/java/ch15/SimpleChatServerTest.java: 2 added lines, 0 removed lines. Original line number Diff line number Diff line package ch15; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import java.io.BufferedReader; Loading @@ -14,6 +15,7 @@ import java.util.concurrent.Executors; import static org.junit.jupiter.api.Assertions.assertTrue; // Needs a SimpleChatServer running (is not a real unit test class, more like an integration test) @Disabled class SimpleChatServerTest { @Test void testSend() throws IOException { Loading