This is an automated email from the ASF dual-hosted git repository. orudyy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/qpid-jms-amqp-0-x.git
The following commit(s) were added to refs/heads/master by this push: new d37a493 NO-JIRA: Fix sporadicly failing test d37a493 is described below commit d37a4935de01999bdf96ba2b46b3874b78901fd1 Author: Alex Rudyy <oru...@apache.org> AuthorDate: Fri May 29 13:54:19 2020 +0100 NO-JIRA: Fix sporadicly failing test --- .../org/apache/qpid/systest/connection/ConnectionFactoryTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/systests/src/test/java/org/apache/qpid/systest/connection/ConnectionFactoryTest.java b/systests/src/test/java/org/apache/qpid/systest/connection/ConnectionFactoryTest.java index b3c30cc..66596ad 100644 --- a/systests/src/test/java/org/apache/qpid/systest/connection/ConnectionFactoryTest.java +++ b/systests/src/test/java/org/apache/qpid/systest/connection/ConnectionFactoryTest.java @@ -41,6 +41,8 @@ import javax.jms.JMSException; import org.junit.Before; import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.qpid.client.AMQConnection; import org.apache.qpid.client.AMQConnectionFactory; @@ -53,6 +55,7 @@ import org.apache.qpid.systest.core.JmsTestBase; public class ConnectionFactoryTest extends JmsTestBase { + private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionFactoryTest.class); private static final String BROKER_URL = "tcp://%s:%d%s"; private static final String CONNECTION_URL = "amqp://%s:%s@clientID/?brokerlist='" + BROKER_URL + "'"; private String _urlWithCredentials; @@ -261,13 +264,13 @@ public class ConnectionFactoryTest extends JmsTestBase is(equalTo(BrokerAdmin.BrokerType.BROKERJ))); final InetSocketAddress brokerAddress = brokerAdmin.getBrokerAddress(BrokerAdmin.PortType.AMQP); - final String retriesOption = "?retries='1'"; + final String retriesOption = "?retries='200'&connectdelay='1000'"; final String url = String.format(CONNECTION_URL, "", "", brokerAddress.getHostName(), brokerAddress.getPort(), - retriesOption) + "&failover='singlebroker?cyclecount='1''"; + retriesOption) + "&failover='singlebroker?cyclecount='2''"; final AMQConnectionFactory factory = new AMQConnectionFactory(url); @@ -368,6 +371,7 @@ public class ConnectionFactoryTest extends JmsTestBase @Override public boolean connectAttemptFailed(final URI brokerURI, final JMSException e) { + LOGGER.info(String.format("Connect attempt failed for brokerURI=%s with error code=%s", brokerURI, e.getErrorCode()), e); boolean reattempt = String.valueOf(ErrorCodes.CONNECTION_FORCED).equals(e.getErrorCode()) || String.valueOf(ErrorCodes.NOT_ALLOWED).equals(e.getErrorCode()); if (reattempt) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org