Skip to content

Commit

Permalink
fix: forget another node test
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Jun 17, 2024
1 parent e8cc1c1 commit 3ed6dcc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.concurrent.Future;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;

Expand Down Expand Up @@ -3518,9 +3519,13 @@ public void testChangePeersChaosApplyTasks() throws Exception {
for (final ChangeArg arg : args) {
arg.stop = true;
}
for (final Future<?> future : futures) {
future.get();
}
for (final Future<?> future : futures) {
try {
future.get(20, TimeUnit.SECONDS);
} catch (TimeoutException e) {
// ignore
}
}

cluster.waitLeader();
final SynchronizedClosure done = new SynchronizedClosure();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3407,13 +3407,13 @@ public void testChangePeersChaosApplyTasks() throws Exception {
for (final ChangeArg arg : args) {
arg.stop = true;
}
for (final Future<?> future : futures) {
try {
future.get(20, TimeUnit.SECONDS);
} catch (TimeoutException e) {
// ignore
for (final Future<?> future : futures) {
try {
future.get(20, TimeUnit.SECONDS);
} catch (TimeoutException e) {
// ignore
}
}
}

cluster.waitLeader();
final SynchronizedClosure done = new SynchronizedClosure();
Expand Down

0 comments on commit 3ed6dcc

Please sign in to comment.