NO-JIRA Improving Test Reliability with max-read-page-bytes

This commit is contained in:
Clebert Suconic 2024-06-03 10:04:15 -04:00
parent 8935b1150b
commit 180e434b78
3 changed files with 10 additions and 7 deletions

View File

@ -104,7 +104,8 @@ under the License.
<page-size-bytes>1MB</page-size-bytes>
<max-read-page-messages>-1</max-read-page-messages>
<max-read-page-bytes>-1</max-read-page-bytes>
<max-read-page-bytes>20M</max-read-page-bytes>
<prefetch-page-bytes>2MB</prefetch-page-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>PAGE</address-full-policy>

View File

@ -104,8 +104,10 @@ under the License.
<!-- with -1 only the global-max-size is in use for limiting -->
<max-size-bytes>10MB</max-size-bytes>
<page-size-bytes>1MB</page-size-bytes>
<max-read-page-messages>-1</max-read-page-messages>
<max-read-page-bytes>-1</max-read-page-bytes>
<max-read-page-bytes>20M</max-read-page-bytes>
<prefetch-page-bytes>2MB</prefetch-page-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>PAGE</address-full-policy>

View File

@ -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());
}
}