NO-JIRA Improving a test with Wait
This commit is contained in:
parent
bc2670a543
commit
c3f8321c42
|
@ -27,6 +27,7 @@ import org.apache.activemq.artemis.core.protocol.core.Packet;
|
|||
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
|
||||
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
|
||||
import org.apache.activemq.artemis.tests.util.TransportConfigurationUtils;
|
||||
import org.apache.activemq.artemis.tests.util.Wait;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -51,7 +52,7 @@ public class BackupAuthenticationTest extends FailoverTestBase {
|
|||
* can't intercept the message at the backup, so we intercept the registration message at the
|
||||
* live.
|
||||
*/
|
||||
Thread.sleep(2000);
|
||||
Wait.waitFor(() -> !backupServer.isStarted());
|
||||
assertFalse("backup should have stopped", backupServer.isStarted());
|
||||
backupConfig.setClusterPassword(CLUSTER_PASSWORD);
|
||||
backupServer.start();
|
||||
|
|
Loading…
Reference in New Issue