From 1e85e810bfea40de5900584438da4ca2d88df847 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 5 Jul 2017 07:53:45 -0700 Subject: [PATCH] Issue #1650 - testcase stability effort (take 2) --- .../eclipse/jetty/cdi/websocket/basicapp/BasicAppTest.java | 5 +++-- .../org/eclipse/jetty/cdi/websocket/cdiapp/CdiAppTest.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/jetty-cdi/cdi-websocket/src/test/java/org/eclipse/jetty/cdi/websocket/basicapp/BasicAppTest.java b/jetty-cdi/cdi-websocket/src/test/java/org/eclipse/jetty/cdi/websocket/basicapp/BasicAppTest.java index 966154d0b98..efac2dce4a2 100644 --- a/jetty-cdi/cdi-websocket/src/test/java/org/eclipse/jetty/cdi/websocket/basicapp/BasicAppTest.java +++ b/jetty-cdi/cdi-websocket/src/test/java/org/eclipse/jetty/cdi/websocket/basicapp/BasicAppTest.java @@ -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 { diff --git a/jetty-cdi/cdi-websocket/src/test/java/org/eclipse/jetty/cdi/websocket/cdiapp/CdiAppTest.java b/jetty-cdi/cdi-websocket/src/test/java/org/eclipse/jetty/cdi/websocket/cdiapp/CdiAppTest.java index 152ea8ea4d0..db7642d63df 100644 --- a/jetty-cdi/cdi-websocket/src/test/java/org/eclipse/jetty/cdi/websocket/cdiapp/CdiAppTest.java +++ b/jetty-cdi/cdi-websocket/src/test/java/org/eclipse/jetty/cdi/websocket/cdiapp/CdiAppTest.java @@ -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 {