Merge pull request #762 from khatwaniNikhil/BAEL-418-Changes

Fixed Failing EchoTest
This commit is contained in:
Jim Kerak
2016-10-21 19:16:27 -04:00
committed by GitHub
2 changed files with 24 additions and 9 deletions

View File

@@ -2,17 +2,20 @@ package com.baeldung.java.nio.selector;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.junit.Test;
public class EchoTest {
@Test
public void givenClient_whenServerEchosMessage_thenCorrect() {
public void givenClient_whenServerEchosMessage_thenCorrect() throws IOException, InterruptedException {
Process process = EchoServer.start();
EchoClient client = EchoClient.start();
String resp1 = client.sendMessage("hello");
String resp2 = client.sendMessage("world");
assertEquals("hello", resp1);
assertEquals("world", resp2);
process.destroy();
}
}