Issue #1650 - testcase stability effort (take 2)

This commit is contained in:
Joakim Erdfelt 2017-07-05 07:53:45 -07:00
parent 2fc86c209b
commit 1e85e810bf
2 changed files with 6 additions and 4 deletions

View File

@ -108,11 +108,12 @@ public class BasicAppTest
socket.awaitOpen(5,TimeUnit.SECONDS);
socket.sendText("Hello World");
socket.close(StatusCode.NORMAL,"Test complete");
socket.awaitClose(5,TimeUnit.SECONDS);
String response = socket.getTextMessages().poll(5, TimeUnit.SECONDS);
assertThat("Message[0]",response,is("Hello World"));
socket.close(StatusCode.NORMAL,"Test complete");
socket.awaitClose(5,TimeUnit.SECONDS);
}
finally
{

View File

@ -167,13 +167,14 @@ public class CdiAppTest
socket.awaitOpen(2,TimeUnit.SECONDS);
socket.sendText("data|stuff");
socket.close(StatusCode.NORMAL,"Test complete");
socket.awaitClose(2,TimeUnit.SECONDS);
String response = socket.getTextMessages().poll(5, TimeUnit.SECONDS);
assertThat("Message[0]",response,containsString("Hello there stuff"));
response = socket.getTextMessages().poll(5, TimeUnit.SECONDS);
assertThat("Message[1]",response,notNullValue());
socket.close(StatusCode.NORMAL,"Test complete");
socket.awaitClose(2,TimeUnit.SECONDS);
}
finally
{