You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2016/06/16 15:21:10 UTC
activemq git commit: Allow for the connection to close without
getting the ERROR frame
Repository: activemq
Updated Branches:
refs/heads/master c0713415f -> 5ba867908
Allow for the connection to close without getting the ERROR frame
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/5ba86790
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/5ba86790
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/5ba86790
Branch: refs/heads/master
Commit: 5ba867908347beff855ebbf94771e7646ed2589e
Parents: c071341
Author: Timothy Bish <ta...@gmail.com>
Authored: Thu Jun 16 11:20:59 2016 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Thu Jun 16 11:20:59 2016 -0400
----------------------------------------------------------------------
.../transport/ws/StompWSTransportTest.java | 36 +++++++++++++-------
1 file changed, 24 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/5ba86790/activemq-http/src/test/java/org/apache/activemq/transport/ws/StompWSTransportTest.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/test/java/org/apache/activemq/transport/ws/StompWSTransportTest.java b/activemq-http/src/test/java/org/apache/activemq/transport/ws/StompWSTransportTest.java
index 12b54a4..12e31c0 100644
--- a/activemq-http/src/test/java/org/apache/activemq/transport/ws/StompWSTransportTest.java
+++ b/activemq-http/src/test/java/org/apache/activemq/transport/ws/StompWSTransportTest.java
@@ -145,11 +145,15 @@ public class StompWSTransportTest extends WSTransportTestSupport {
"\n" + Stomp.NULL;
wsStompConnection.sendRawFrame(connectFrame);
- String incoming = wsStompConnection.receive(30, TimeUnit.SECONDS);
+ try {
+ String incoming = wsStompConnection.receive(30, TimeUnit.SECONDS);
- assertTrue(incoming.startsWith("ERROR"));
- assertTrue(incoming.indexOf("heart-beat") >= 0);
- assertTrue(incoming.indexOf("message:") >= 0);
+ assertTrue(incoming.startsWith("ERROR"));
+ assertTrue(incoming.indexOf("heart-beat") >= 0);
+ assertTrue(incoming.indexOf("message:") >= 0);
+ } catch (IOException ex) {
+ LOG.debug("Connection closed before Frame was read.");
+ }
assertTrue("Connection should close", Wait.waitFor(new Wait.Condition() {
@@ -171,11 +175,15 @@ public class StompWSTransportTest extends WSTransportTestSupport {
"\n" + Stomp.NULL;
wsStompConnection.sendRawFrame(connectFrame);
- String incoming = wsStompConnection.receive(30, TimeUnit.SECONDS);
+ try {
+ String incoming = wsStompConnection.receive(30, TimeUnit.SECONDS);
- assertTrue(incoming.startsWith("ERROR"));
- assertTrue(incoming.indexOf("heart-beat") >= 0);
- assertTrue(incoming.indexOf("message:") >= 0);
+ assertTrue(incoming.startsWith("ERROR"));
+ assertTrue(incoming.indexOf("heart-beat") >= 0);
+ assertTrue(incoming.indexOf("message:") >= 0);
+ } catch (IOException ex) {
+ LOG.debug("Connection closed before Frame was read.");
+ }
assertTrue("Connection should close", Wait.waitFor(new Wait.Condition() {
@@ -197,11 +205,15 @@ public class StompWSTransportTest extends WSTransportTestSupport {
"\n" + Stomp.NULL;
wsStompConnection.sendRawFrame(connectFrame);
- String incoming = wsStompConnection.receive(30, TimeUnit.SECONDS);
+ try {
+ String incoming = wsStompConnection.receive(30, TimeUnit.SECONDS);
- assertTrue(incoming.startsWith("ERROR"));
- assertTrue(incoming.indexOf("heart-beat") >= 0);
- assertTrue(incoming.indexOf("message:") >= 0);
+ assertTrue(incoming.startsWith("ERROR"));
+ assertTrue(incoming.indexOf("heart-beat") >= 0);
+ assertTrue(incoming.indexOf("message:") >= 0);
+ } catch (IOException ex) {
+ LOG.debug("Connection closed before Frame was read.");
+ }
assertTrue("Connection should close", Wait.waitFor(new Wait.Condition() {