Skip to content

Commit

Permalink
timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
clebertsuconic committed Jan 29, 2025
1 parent c6a0fd0 commit 0e61a78
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package org.apache.activemq.artemis.tests.soak.replicationflow;

import static org.junit.jupiter.api.Assertions.assertTimeout;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

Expand All @@ -27,6 +28,7 @@
import javax.jms.Queue;
import javax.jms.Session;
import java.io.File;
import java.time.Duration;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
Expand Down Expand Up @@ -102,12 +104,12 @@ public void after() throws Exception {

@Test
public void testPageWhileSynchronizingReplica() throws Exception {
internalTest(false);
assertTimeout(Duration.ofMinutes(2), () -> internalTest(false));
}

@Test
public void testPageWhileSyncFailover() throws Exception {
internalTest(true);
assertTimeout(Duration.ofMinutes(2), () -> internalTest(true));
}

private void internalTest(boolean failover) throws Exception {
Expand Down

0 comments on commit 0e61a78

Please sign in to comment.