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

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


The following commit(s) were added to refs/heads/main by this push:
     new e64ea54  Additional test timeout alterations to mitigate spurious CI 
failures
e64ea54 is described below

commit e64ea5452ec271748cf13e740307a02347825d63
Author: Timothy Bish <tabish...@gmail.com>
AuthorDate: Fri Apr 30 17:44:43 2021 -0400

    Additional test timeout alterations to mitigate spurious CI failures
    
    More rework of timeout configuration updates to attempt to resolve
    spurious timeout test failures on very slow CI or other hardware.
---
 .../protonj2/client/impl/ReconnectSessionTest.java |  2 ++
 .../protonj2/client/impl/StreamReceiverTest.java   | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReconnectSessionTest.java
 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReconnectSessionTest.java
index b8d60ef..f01d7a1 100644
--- 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReconnectSessionTest.java
+++ 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReconnectSessionTest.java
@@ -63,6 +63,7 @@ class ReconnectSessionTest extends ImperativeClientTestCase {
             final URI backupURI = finalPeer.getServerURI();
 
             ConnectionOptions options = new ConnectionOptions();
+            options.idleTimeout(5, TimeUnit.SECONDS);
             options.reconnectOptions().reconnectEnabled(true);
             
options.reconnectOptions().addReconnectLocation(backupURI.getHost(), 
backupURI.getPort());
 
@@ -164,6 +165,7 @@ class ReconnectSessionTest extends ImperativeClientTestCase 
{
 
             ConnectionOptions options = new ConnectionOptions();
             options.reconnectOptions().reconnectEnabled(true);
+            options.idleTimeout(5, TimeUnit.SECONDS);
             
options.reconnectOptions().addReconnectLocation(intermediateURI.getHost(), 
intermediateURI.getPort());
             
options.reconnectOptions().addReconnectLocation(backupURI.getHost(), 
backupURI.getPort());
 
diff --git 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/StreamReceiverTest.java
 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/StreamReceiverTest.java
index 3903fc1..c468071 100644
--- 
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/StreamReceiverTest.java
+++ 
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/StreamReceiverTest.java
@@ -3403,7 +3403,7 @@ class StreamReceiverTest extends ImperativeClientTestCase 
{
             Client container = Client.create();
             Connection connection = container.connect(remoteURI.getHost(), 
remoteURI.getPort());
             StreamReceiverOptions options = new 
StreamReceiverOptions().openTimeout(120, TimeUnit.MILLISECONDS);
-            Receiver receiver = connection.openStreamReceiver("test-receiver", 
options);
+            StreamReceiver receiver = 
connection.openStreamReceiver("test-receiver", options);
 
             peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
 
@@ -3469,9 +3469,9 @@ class StreamReceiverTest extends ImperativeClientTestCase 
{
             LOG.info("Test started, peer listening on: {}", remoteURI);
 
             Client container = Client.create();
-            ConnectionOptions options = new 
ConnectionOptions().openTimeout(100);
-            Connection connection = container.connect(remoteURI.getHost(), 
remoteURI.getPort(), options);
-            StreamReceiver receiver = 
connection.openStreamReceiver("test-receiver");
+            Connection connection = container.connect(remoteURI.getHost(), 
remoteURI.getPort());
+            StreamReceiverOptions options = new 
StreamReceiverOptions().openTimeout(120, TimeUnit.MILLISECONDS);
+            StreamReceiver receiver = 
connection.openStreamReceiver("test-receiver", options);
 
             peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
 
@@ -3535,9 +3535,9 @@ class StreamReceiverTest extends ImperativeClientTestCase 
{
             LOG.info("Test started, peer listening on: {}", remoteURI);
 
             Client container = Client.create();
-            ConnectionOptions options = new 
ConnectionOptions().openTimeout(100);
-            Connection connection = container.connect(remoteURI.getHost(), 
remoteURI.getPort(), options);
-            Receiver receiver = connection.openStreamReceiver("test-receiver");
+            Connection connection = container.connect(remoteURI.getHost(), 
remoteURI.getPort());
+            StreamReceiverOptions options = new 
StreamReceiverOptions().openTimeout(120, TimeUnit.MILLISECONDS);
+            StreamReceiver receiver = 
connection.openStreamReceiver("test-receiver", options);
 
             peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
 
@@ -3601,9 +3601,9 @@ class StreamReceiverTest extends ImperativeClientTestCase 
{
             LOG.info("Test started, peer listening on: {}", remoteURI);
 
             Client container = Client.create();
-            ConnectionOptions options = new 
ConnectionOptions().openTimeout(100);
-            Connection connection = container.connect(remoteURI.getHost(), 
remoteURI.getPort(), options);
-            Receiver receiver = connection.openStreamReceiver("test-receiver");
+            Connection connection = container.connect(remoteURI.getHost(), 
remoteURI.getPort());
+            StreamReceiverOptions options = new 
StreamReceiverOptions().openTimeout(120, TimeUnit.MILLISECONDS);
+            StreamReceiver receiver = 
connection.openStreamReceiver("test-receiver", options);
 
             peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
 
@@ -3666,7 +3666,7 @@ class StreamReceiverTest extends ImperativeClientTestCase 
{
 
             Client container = Client.create();
             Connection connection = container.connect(remoteURI.getHost(), 
remoteURI.getPort());
-            StreamReceiverOptions options = new 
StreamReceiverOptions().openTimeout(100, TimeUnit.MILLISECONDS);
+            StreamReceiverOptions options = new 
StreamReceiverOptions().openTimeout(120, TimeUnit.MILLISECONDS);
             StreamReceiver receiver = 
connection.openStreamReceiver("test-receiver", options);
 
             peer.waitForScriptToComplete(5, TimeUnit.SECONDS);

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

Reply via email to