You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2020/03/17 18:15:40 UTC

[qpid-jms] branch master updated: NO-JIRA Fix intermittent failure from peer on sudden socket close

This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-jms.git


The following commit(s) were added to refs/heads/master by this push:
     new cfdefc7  NO-JIRA Fix intermittent failure from peer on sudden socket close
cfdefc7 is described below

commit cfdefc7895e210fd9e4f25727209e7d18e2d5084
Author: Timothy Bish <ta...@gmail.com>
AuthorDate: Tue Mar 17 14:13:37 2020 -0400

    NO-JIRA Fix intermittent failure from peer on sudden socket close
    
    Ignore error from test peer on sudden close of socket from client after
    SASL exchange as that is expected from this test when open performative
    encode failure occurs.
---
 .../org/apache/qpid/jms/integration/ConnectionIntegrationTest.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java
index de001a0..0369950 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java
@@ -24,6 +24,7 @@ import static org.apache.qpid.jms.provider.amqp.AmqpSupport.NETWORK_HOST;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.OPEN_HOSTNAME;
 import static org.apache.qpid.jms.provider.amqp.AmqpSupport.PORT;
 import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.allOf;
 import static org.hamcrest.Matchers.arrayContaining;
 import static org.hamcrest.Matchers.equalTo;
@@ -34,7 +35,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -1032,6 +1032,7 @@ public class ConnectionIntegrationTest extends QpidJmsTestCase {
     public void testConnectionFailsWhenUserSuppliesIllegalProperties() throws Exception {
         try (TestAmqpPeer testPeer = new TestAmqpPeer();) {
 
+            testPeer.setSuppressReadExceptionOnClose(true);
             testPeer.expectSaslAnonymous();
 
             final URI remoteURI = new URI("amqp://localhost:" + testPeer.getServerPort());
@@ -1052,6 +1053,8 @@ public class ConnectionIntegrationTest extends QpidJmsTestCase {
                 connection.start();
                 fail("Should not be able to connect when illegal types are in the properties");
             } catch (JMSException ex) {
+            } catch (Exception unexpected) {
+                fail("Caught unexpected error from connnection.start() : " + unexpected);
             }
 
             testPeer.waitForAllHandlersToComplete(1000);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org