Issue #1650 - testcase stability effort
This commit is contained in:
parent
ed692f3917
commit
2fc86c209b
|
@ -111,9 +111,7 @@ public class BasicAppTest
|
|||
socket.close(StatusCode.NORMAL,"Test complete");
|
||||
socket.awaitClose(5,TimeUnit.SECONDS);
|
||||
|
||||
assertThat("Messages received",socket.getTextMessages().size(),is(1));
|
||||
String response = socket.getTextMessages().poll(5, TimeUnit.SECONDS);
|
||||
|
||||
assertThat("Message[0]",response,is("Hello World"));
|
||||
}
|
||||
finally
|
||||
|
|
|
@ -21,6 +21,7 @@ package org.eclipse.jetty.cdi.websocket.cdiapp;
|
|||
import static org.hamcrest.Matchers.allOf;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -139,8 +140,7 @@ public class CdiAppTest
|
|||
socket.close(StatusCode.NORMAL,"Test complete");
|
||||
socket.awaitClose(2,TimeUnit.SECONDS);
|
||||
|
||||
assertThat("Messages received",socket.getTextMessages().size(),is(1));
|
||||
String response = socket.getTextMessages().poll();
|
||||
String response = socket.getTextMessages().poll(5, TimeUnit.SECONDS);
|
||||
|
||||
assertThat("Message[0]",response,
|
||||
allOf(
|
||||
|
@ -170,9 +170,10 @@ public class CdiAppTest
|
|||
socket.close(StatusCode.NORMAL,"Test complete");
|
||||
socket.awaitClose(2,TimeUnit.SECONDS);
|
||||
|
||||
assertThat("Messages received",socket.getTextMessages().size(),is(2));
|
||||
String response = socket.getTextMessages().poll();
|
||||
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());
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue