Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARTEMIS-5159 lowering number of threads on SoakReplicatedPagingTest #5351

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ public void before() throws Exception {
server0 = startServer(SERVER_NAME_0, 0, 30000);
}

static final int consumer_threads = 20;
static final int producer_threads = 20;
static final int CONSUMER_THREADS = 5;
static final int PRODUCER_THREADS = 5;
static AtomicInteger producer_count = new AtomicInteger(0);
static AtomicInteger consumer_count = new AtomicInteger(0);

Expand Down Expand Up @@ -187,10 +187,10 @@ public static void main(String[] arg) {

final ConnectionFactory factory = createConnectionFactory(protocol, "tcp://" + host + ":" + port);

CountDownLatch producersLatch = new CountDownLatch(producer_threads);
CountDownLatch consumersLatch = new CountDownLatch(consumer_threads);
CountDownLatch producersLatch = new CountDownLatch(PRODUCER_THREADS);
CountDownLatch consumersLatch = new CountDownLatch(CONSUMER_THREADS);

for (int i = 0; i < producer_threads; i++) {
for (int i = 0; i < PRODUCER_THREADS; i++) {
Thread t = new Thread(() -> {
SoakReplicatedPagingTest app = new SoakReplicatedPagingTest(protocol, consumerType, tx);
app.produce(factory, producer_count.incrementAndGet(), producersLatch);
Expand All @@ -200,7 +200,7 @@ public static void main(String[] arg) {

Thread.sleep(1000);

for (int i = 0; i < consumer_threads; i++) {
for (int i = 0; i < CONSUMER_THREADS; i++) {
Thread t = new Thread(() -> {
SoakReplicatedPagingTest app = new SoakReplicatedPagingTest(protocol, consumerType, tx);
app.consume(factory, consumer_count.getAndIncrement(), consumersLatch);
Expand Down