You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2018/03/20 12:12:22 UTC
qpid-broker-j git commit: NO-JIRA: [Broker-J] [Protocol Test AMQP
0-8] Fix sporadically failing ConnectionTest#heartbeatingNoIncomingTraffic on
Travis-CI
Repository: qpid-broker-j
Updated Branches:
refs/heads/master 07aaa13b0 -> 5c570579d
NO-JIRA: [Broker-J] [Protocol Test AMQP 0-8] Fix sporadically failing ConnectionTest#heartbeatingNoIncomingTraffic on Travis-CI
Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/5c570579
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/5c570579
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/5c570579
Branch: refs/heads/master
Commit: 5c570579d3e1b2cfa38be4295ad36156b0aa5e3e
Parents: 07aaa13
Author: Keith Wall <kw...@apache.org>
Authored: Tue Mar 20 12:10:01 2018 +0000
Committer: Keith Wall <kw...@apache.org>
Committed: Tue Mar 20 12:11:03 2018 +0000
----------------------------------------------------------------------
.../qpid/tests/protocol/v0_8/ConnectionTest.java | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/5c570579/systests/protocol-tests-amqp-0-8/src/test/java/org/apache/qpid/tests/protocol/v0_8/ConnectionTest.java
----------------------------------------------------------------------
diff --git a/systests/protocol-tests-amqp-0-8/src/test/java/org/apache/qpid/tests/protocol/v0_8/ConnectionTest.java b/systests/protocol-tests-amqp-0-8/src/test/java/org/apache/qpid/tests/protocol/v0_8/ConnectionTest.java
index a05874f..edaf04e 100644
--- a/systests/protocol-tests-amqp-0-8/src/test/java/org/apache/qpid/tests/protocol/v0_8/ConnectionTest.java
+++ b/systests/protocol-tests-amqp-0-8/src/test/java/org/apache/qpid/tests/protocol/v0_8/ConnectionTest.java
@@ -52,6 +52,7 @@ import org.apache.qpid.server.protocol.v0_8.transport.ConnectionStartBody;
import org.apache.qpid.server.protocol.v0_8.transport.ConnectionTuneBody;
import org.apache.qpid.server.protocol.v0_8.transport.HeartbeatBody;
import org.apache.qpid.tests.protocol.ChannelClosedResponse;
+import org.apache.qpid.tests.protocol.Response;
import org.apache.qpid.tests.protocol.SpecificationTest;
import org.apache.qpid.tests.utils.BrokerAdmin;
import org.apache.qpid.tests.utils.BrokerAdminUsingTestBase;
@@ -361,7 +362,7 @@ public class ConnectionTest extends BrokerAdminUsingTestBase
}
catch (ExecutionException e)
{
- Throwable original = ((ExecutionException) e).getCause();
+ Throwable original = e.getCause();
if (original instanceof IOException)
{
// PASS
@@ -528,7 +529,19 @@ public class ConnectionTest extends BrokerAdminUsingTestBase
// Do not reflect a heartbeat so incoming line will be silent thus
// requiring the broker to close the connection.
- transport.assertNoMoreResponsesAndChannelClosed();
+
+ Class[] classes = new Class[] {ChannelClosedResponse.class, HeartbeatBody.class};
+ do
+ {
+ Response<?> latestResponse = interaction.consumeResponse(classes)
+ .getLatestResponse();
+ if (latestResponse instanceof ChannelClosedResponse)
+ {
+ break;
+ }
+ classes = new Class[] {ChannelClosedResponse.class};
+ }
+ while (true);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org