From 180e434b78128f32fae1af405d0fc8c6540ea25f Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Mon, 3 Jun 2024 10:04:15 -0400 Subject: [PATCH] NO-JIRA Improving Test Reliability with max-read-page-bytes --- .../resources/servers/replicated-static0/broker.xml | 3 ++- .../resources/servers/replicated-static1/broker.xml | 4 +++- .../soak/replicationflow/SoakReplicatedPagingTest.java | 10 +++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/soak-tests/src/main/resources/servers/replicated-static0/broker.xml b/tests/soak-tests/src/main/resources/servers/replicated-static0/broker.xml index 70a58b9310..acadb1ee21 100644 --- a/tests/soak-tests/src/main/resources/servers/replicated-static0/broker.xml +++ b/tests/soak-tests/src/main/resources/servers/replicated-static0/broker.xml @@ -104,7 +104,8 @@ under the License. 1MB -1 - -1 + 20M + 2MB 10 PAGE diff --git a/tests/soak-tests/src/main/resources/servers/replicated-static1/broker.xml b/tests/soak-tests/src/main/resources/servers/replicated-static1/broker.xml index b1f3a6ca9a..3439ed6c96 100644 --- a/tests/soak-tests/src/main/resources/servers/replicated-static1/broker.xml +++ b/tests/soak-tests/src/main/resources/servers/replicated-static1/broker.xml @@ -104,8 +104,10 @@ under the License. 10MB 1MB + -1 - -1 + 20M + 2MB 10 PAGE diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/replicationflow/SoakReplicatedPagingTest.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/replicationflow/SoakReplicatedPagingTest.java index 0a61858cc9..fbe137922a 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/replicationflow/SoakReplicatedPagingTest.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/replicationflow/SoakReplicatedPagingTest.java @@ -171,7 +171,7 @@ public class SoakReplicatedPagingTest extends SoakTestBase { if (arg.length != 4) { System.err.println("You need to pass in protocol, consumerType, Time, transaction"); - exit(0, "invalid arguments"); + exit(2, "invalid arguments"); } String protocol = arg[0]; @@ -217,13 +217,13 @@ public class SoakReplicatedPagingTest extends SoakTestBase { logger.debug("Awaiting producers..."); if (!producersLatch.await(60000, TimeUnit.MILLISECONDS)) { System.out.println("Awaiting producers timeout"); - exit(-1, "awaiting producers timeout"); + exit(3, "awaiting producers timeout"); } logger.debug("Awaiting consumers..."); if (!consumersLatch.await(60000, TimeUnit.MILLISECONDS)) { System.out.println("Awaiting consumers timeout"); - exit(-2, "Consumer did not start"); + exit(4, "Consumer did not start"); } logger.debug("Awaiting timeout..."); @@ -234,14 +234,14 @@ public class SoakReplicatedPagingTest extends SoakTestBase { Wait.assertTrue(() -> consumed.get() > 0, 15_000, 100); } - int exitStatus = consumed.get() > 0 ? OK : -3; + int exitStatus = consumed.get() > 0 ? OK : 5; logger.debug("Exiting with the status: {}", exitStatus); exit(exitStatus, "Consumed " + consumed.get() + " messages"); } catch (Throwable t) { System.err.println("Exiting with the status 0. Reason: " + t); t.printStackTrace(); - exit(-4, t.getMessage()); + exit(6, t.getMessage()); } }