This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new add773e0fd NO-JIRA more information on test in case of failures
add773e0fd is described below
commit add773e0fdc62f35c721f64926154167fe5f6bb1
Author: Clebert Suconic <[email protected]>
AuthorDate: Fri May 31 16:42:16 2024 -0400
NO-JIRA more information on test in case of failures
---
.../replicationflow/SoakReplicatedPagingTest.java | 23 +++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
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 1e8049924a..0758a5425e 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
@@ -166,7 +166,7 @@ public class SoakReplicatedPagingTest extends SoakTestBase {
if (arg.length != 4) {
System.err.println("You need to pass in protocol, consumerType,
Time, transaction");
- System.exit(0);
+ exit(0, "invalid arguments");
}
String protocol = arg[0];
@@ -211,28 +211,33 @@ public class SoakReplicatedPagingTest extends
SoakTestBase {
logger.debug("Awaiting producers...");
if (!producersLatch.await(60000, TimeUnit.MILLISECONDS)) {
- System.err.println("Awaiting producers timeout");
- System.exit(0);
+ System.out.println("Awaiting producers timeout");
+ exit(-1, "awaiting producers timeout");
}
logger.debug("Awaiting consumers...");
if (!consumersLatch.await(60000, TimeUnit.MILLISECONDS)) {
- System.err.println("Awaiting consumers timeout");
- System.exit(0);
+ System.out.println("Awaiting consumers timeout");
+ exit(-2, "Consumer did not start");
}
logger.debug("Awaiting timeout...");
Thread.sleep(time);
- int exitStatus = consumed.get() > 0 ? 1 : 0;
+ int exitStatus = consumed.get() > 0 ? 1 : -3;
logger.debug("Exiting with the status: {}", exitStatus);
- System.exit(exitStatus);
+
+ exit(exitStatus, "Consumed " + consumed.get() + " messages");
} catch (Throwable t) {
System.err.println("Exiting with the status 0. Reason: " + t);
t.printStackTrace();
- System.exit(0);
+ exit(-4, t.getMessage());
}
+ }
+ public static void exit(int code, String message) {
+ System.out.println("Exit code:: " + message);
+ System.exit(code);
}
@Test
@@ -254,7 +259,7 @@ public class SoakReplicatedPagingTest extends SoakTestBase {
if (result <= 0) {
jstack();
}
- Assert.assertTrue(result > 0);
+ Assert.assertEquals(0, result);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact