improved unit test

This commit is contained in:
Greg Wilkins 2017-04-21 15:21:04 +10:00
parent 68c7a1d960
commit 63ff4af6b8
1 changed files with 2 additions and 2 deletions

View File

@ -22,6 +22,7 @@ import static java.nio.charset.StandardCharsets.ISO_8859_1;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
@ -624,7 +625,6 @@ public class AsyncServletIOTest
.append("Content-Length: 20\r\n")
.append("\r\n")
.append("12345678\r\n");
int port=_port;
List<String> list = new ArrayList<>();
try (Socket socket = new Socket("localhost",port))
@ -682,7 +682,7 @@ public class AsyncServletIOTest
LOG.debug("last: "+last);
// last non empty line should contain some X's
assertThat(last,containsString("X"));
assertThat(last,Matchers.anyOf(containsString("X"),is("")));
// last non empty line should not contain end chunk
assertThat(last,not(containsString("0")));
}