Skip to content

Commit

Permalink
NO-JIRA Making ClusteredLargeMessageTest more reliable
Browse files Browse the repository at this point in the history
This is waiting and asserting the topology size before starting the test methods.
  • Loading branch information
clebertsuconic committed Jan 23, 2024
1 parent 44ceeff commit 4b78cab
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@

import java.io.File;

import org.apache.activemq.artemis.api.core.management.SimpleManagement;
import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
import org.apache.activemq.artemis.tests.util.CFUtil;
import org.apache.activemq.artemis.util.ServerUtil;
import org.apache.activemq.artemis.utils.Wait;
import org.apache.activemq.artemis.utils.cli.helper.HelperCreate;
import org.junit.Assert;
import org.junit.Before;
Expand Down Expand Up @@ -73,8 +76,17 @@ public static void createServers() throws Exception {
public void before() throws Exception {
cleanupData(SERVER_NAME_0);
cleanupData(SERVER_NAME_1);
server0Process = startServer(SERVER_NAME_0, 0, 30000);
server1Process = startServer(SERVER_NAME_1, 100, 30000);
server0Process = startServer(SERVER_NAME_0, 0, 0);
server1Process = startServer(SERVER_NAME_1, 0, 0);

ServerUtil.waitForServerToStart(0, null, null, 30000);
ServerUtil.waitForServerToStart(100, null, null, 30000);

SimpleManagement simpleManagement61616 = new SimpleManagement("tcp://localhost:61616", null, null);
Wait.assertEquals(2, () -> simpleManagement61616.listNetworkTopology().size());
SimpleManagement simpleManagement61716 = new SimpleManagement("tcp://localhost:61716", null, null);
Wait.assertEquals(2, () -> simpleManagement61716.listNetworkTopology().size());

}

@Test
Expand Down

0 comments on commit 4b78cab

Please sign in to comment.