Skip to content

Commit

Permalink
Fix for the timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jvarenina committed Sep 19, 2022
1 parent 5537c05 commit d43af99
Showing 1 changed file with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@
import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
import static org.apache.geode.test.dunit.IgnoredException.addIgnoredException;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;

import java.text.NumberFormat;
import java.text.ParseException;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Properties;
Expand Down Expand Up @@ -1166,12 +1168,20 @@ private int create2WanSitesAndClient(VM locatorInA, List<VM> serversInA, String

private void createSender(boolean isParallelGatewaySender, List<VM> servers,
String senderId, int remoteDsId) {
for (VM server : servers) {
server.invoke(() -> createSender(senderId, remoteDsId, isParallelGatewaySender,
100, 10, false,
false, null, true));
List<AsyncInvocation<Void>> tasks = new LinkedList<>();
for (VM vm : servers) {
tasks.add(vm.invokeAsync(
() -> vm.invoke(() -> createSender(senderId, remoteDsId, isParallelGatewaySender,
100, 10, false,
false, null, false))));
}
for (AsyncInvocation<Void> invocation : tasks) {
try {
invocation.await();
} catch (InterruptedException e) {
fail("Creating and starting senders was interrupted");
}
}
startSenderInVMsAsync(senderId, servers.toArray(new VM[0]));
}

private void createReceivers(List<VM> serversInB, VM serverInC) {
Expand Down

0 comments on commit d43af99

Please sign in to comment.