Merge pull request #762 from khatwaniNikhil/BAEL-418-Changes
Fixed Failing EchoTest
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user