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 5c6721f2 PROTON-2780 Extend some timeouts on tests that can fail in CI
5c6721f2 is described below
commit 5c6721f224ea56fbe7f4d90424b41e6b9bca4a0e
Author: Timothy Bish <[email protected]>
AuthorDate: Wed Dec 6 17:59:26 2023 -0500
PROTON-2780 Extend some timeouts on tests that can fail in CI
Some tests can use longer timeouts to account for slow CI VMs
---
.../qpid/protonj2/client/futures/ClientFutureTest.java | 7 +++++--
.../org/apache/qpid/protonj2/client/impl/ClientTest.java | 2 +-
.../org/apache/qpid/protonj2/client/impl/ConnectionTest.java | 6 +++---
.../org/apache/qpid/protonj2/client/impl/ReceiverTest.java | 12 ++++++------
.../org/apache/qpid/protonj2/client/impl/ReconnectTest.java | 6 +++---
.../apache/qpid/protonj2/client/impl/StreamReceiverTest.java | 10 +++++-----
6 files changed, 23 insertions(+), 20 deletions(-)
diff --git
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/futures/ClientFutureTest.java
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/futures/ClientFutureTest.java
index c64d3ce9..3af2c81a 100644
---
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/futures/ClientFutureTest.java
+++
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/futures/ClientFutureTest.java
@@ -443,9 +443,11 @@ public class ClientFutureTest {
runner.start();
assertTrue(syncing.await(5, TimeUnit.SECONDS));
+
+ Thread.yield();
runner.interrupt();
- assertTrue(done.await(5, TimeUnit.SECONDS));
+ assertTrue(done.await(6, TimeUnit.SECONDS));
assertTrue(interrupted.get());
}
@@ -480,9 +482,10 @@ public class ClientFutureTest {
runner.start();
assertTrue(syncing.await(5, TimeUnit.SECONDS));
+ Thread.yield();
runner.interrupt();
- assertTrue(done.await(5, TimeUnit.SECONDS));
+ assertTrue(done.await(6, TimeUnit.SECONDS));
assertTrue(interrupted.get());
}
diff --git
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ClientTest.java
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ClientTest.java
index a14472d2..5f0d0d55 100644
---
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ClientTest.java
+++
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ClientTest.java
@@ -177,7 +177,7 @@ public class ClientTest extends ImperativeClientTestCase {
firstPeer.expectClose().respond().afterDelay(10);
secondPeer.expectClose().respond().afterDelay(15);
- container.closeAsync().get(5, TimeUnit.SECONDS);
+ container.closeAsync().get(8, TimeUnit.SECONDS);
firstPeer.waitForScriptToComplete();
secondPeer.waitForScriptToComplete();
diff --git
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ConnectionTest.java
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ConnectionTest.java
index f60bee32..44a69b9d 100644
---
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ConnectionTest.java
+++
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ConnectionTest.java
@@ -761,7 +761,7 @@ public class ConnectionTest extends
ImperativeClientTestCase {
LOG.info("Test started, peer listening on: {}", remoteURI);
- final ConnectionOptions options =
connectionOptions().openTimeout(75);
+ final ConnectionOptions options =
connectionOptions().openTimeout(100);
Client container = Client.create();
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort(), options);
@@ -778,7 +778,7 @@ public class ConnectionTest extends
ImperativeClientTestCase {
LOG.info("connection open failed with error: ", error);
}
- peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
+ peer.waitForScriptToComplete(6, TimeUnit.SECONDS);
}
}
@@ -1609,7 +1609,7 @@ public class ConnectionTest extends
ImperativeClientTestCase {
connection.closeAsync().get();
- peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
+ peer.waitForScriptToComplete(6, TimeUnit.SECONDS);
}
}
diff --git
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReceiverTest.java
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReceiverTest.java
index 23ab5dc9..a3d62ae4 100644
---
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReceiverTest.java
+++
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReceiverTest.java
@@ -814,7 +814,7 @@ public class ReceiverTest extends ImperativeClientTestCase {
LOG.info("Test started, peer listening on: {}", remoteURI);
Client container = Client.create();
- ConnectionOptions options = new
ConnectionOptions().openTimeout(100);
+ ConnectionOptions options = new
ConnectionOptions().openTimeout(250);
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort(), options);
connection.openFuture().get();
@@ -935,7 +935,7 @@ public class ReceiverTest extends ImperativeClientTestCase {
LOG.info("Test started, peer listening on: {}", remoteURI);
Client container = Client.create();
- ConnectionOptions options = new
ConnectionOptions().openTimeout(100);
+ ConnectionOptions options = new
ConnectionOptions().openTimeout(250);
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort(), options);
connection.openFuture().get();
@@ -1003,7 +1003,7 @@ public class ReceiverTest extends
ImperativeClientTestCase {
LOG.info("Test started, peer listening on: {}", remoteURI);
Client container = Client.create();
- ConnectionOptions options = new
ConnectionOptions().openTimeout(100);
+ ConnectionOptions options = new
ConnectionOptions().openTimeout(250);
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort(), options);
connection.openFuture().get();
@@ -1074,7 +1074,7 @@ public class ReceiverTest extends
ImperativeClientTestCase {
Session session = connection.openSession();
session.openFuture().get();
- ReceiverOptions options = new ReceiverOptions().openTimeout(100);
+ ReceiverOptions options = new ReceiverOptions().openTimeout(250);
Receiver receiver = session.openReceiver("test-receiver", options);
peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
@@ -1139,7 +1139,7 @@ public class ReceiverTest extends
ImperativeClientTestCase {
LOG.info("Test started, peer listening on: {}", remoteURI);
Client container = Client.create();
- ConnectionOptions options = new
ConnectionOptions().openTimeout(100);
+ ConnectionOptions options = new
ConnectionOptions().openTimeout(250);
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort(), options);
connection.openFuture().get();
@@ -1208,7 +1208,7 @@ public class ReceiverTest extends
ImperativeClientTestCase {
LOG.info("Test started, peer listening on: {}", remoteURI);
Client container = Client.create();
- ConnectionOptions options = new
ConnectionOptions().openTimeout(100);
+ ConnectionOptions options = new
ConnectionOptions().openTimeout(250);
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort(), options);
connection.openFuture().get();
diff --git
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReconnectTest.java
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReconnectTest.java
index 28cf7789..03d3fa24 100644
---
a/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReconnectTest.java
+++
b/protonj2-client/src/test/java/org/apache/qpid/protonj2/client/impl/ReconnectTest.java
@@ -230,9 +230,9 @@ public class ReconnectTest extends ImperativeClientTestCase
{
connection.openFuture().get();
- firstPeer.waitForScriptToComplete(5, TimeUnit.SECONDS);
- secondPeer.waitForScriptToComplete(5, TimeUnit.SECONDS);
- thirdPeer.waitForScriptToComplete(5, TimeUnit.SECONDS);
+ firstPeer.waitForScriptToComplete(6, TimeUnit.SECONDS);
+ secondPeer.waitForScriptToComplete(6, TimeUnit.SECONDS);
+ thirdPeer.waitForScriptToComplete(6, TimeUnit.SECONDS);
// Should connect, then fail and attempt to connect to second and
third before stopping
assertTrue(connected.await(5, TimeUnit.SECONDS));
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 e3521b05..7824b220 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
@@ -3433,7 +3433,7 @@ class StreamReceiverTest extends ImperativeClientTestCase
{
Client container = Client.create();
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort());
- StreamReceiverOptions options = new
StreamReceiverOptions().openTimeout(150, TimeUnit.MILLISECONDS);
+ StreamReceiverOptions options = new
StreamReceiverOptions().openTimeout(250, TimeUnit.MILLISECONDS);
StreamReceiver receiver =
connection.openStreamReceiver("test-receiver", options);
peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
@@ -3501,7 +3501,7 @@ class StreamReceiverTest extends ImperativeClientTestCase
{
Client container = Client.create();
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort());
- StreamReceiverOptions options = new
StreamReceiverOptions().openTimeout(150, TimeUnit.MILLISECONDS);
+ StreamReceiverOptions options = new
StreamReceiverOptions().openTimeout(250, TimeUnit.MILLISECONDS);
StreamReceiver receiver =
connection.openStreamReceiver("test-receiver", options);
peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
@@ -3567,7 +3567,7 @@ class StreamReceiverTest extends ImperativeClientTestCase
{
Client container = Client.create();
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort());
- StreamReceiverOptions options = new
StreamReceiverOptions().openTimeout(150, TimeUnit.MILLISECONDS);
+ StreamReceiverOptions options = new
StreamReceiverOptions().openTimeout(250, TimeUnit.MILLISECONDS);
StreamReceiver receiver =
connection.openStreamReceiver("test-receiver", options);
peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
@@ -3633,7 +3633,7 @@ class StreamReceiverTest extends ImperativeClientTestCase
{
Client container = Client.create();
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort());
- StreamReceiverOptions options = new
StreamReceiverOptions().openTimeout(150, TimeUnit.MILLISECONDS);
+ StreamReceiverOptions options = new
StreamReceiverOptions().openTimeout(250, TimeUnit.MILLISECONDS);
StreamReceiver receiver =
connection.openStreamReceiver("test-receiver", options);
peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
@@ -3697,7 +3697,7 @@ class StreamReceiverTest extends ImperativeClientTestCase
{
Client container = Client.create();
Connection connection = container.connect(remoteURI.getHost(),
remoteURI.getPort());
- StreamReceiverOptions options = new
StreamReceiverOptions().openTimeout(150, TimeUnit.MILLISECONDS);
+ StreamReceiverOptions options = new
StreamReceiverOptions().openTimeout(250, TimeUnit.MILLISECONDS);
StreamReceiver receiver =
connection.openStreamReceiver("test-receiver", options);
peer.waitForScriptToComplete(5, TimeUnit.SECONDS);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]