rabbit_stream_SUITE: Increase some timeouts

This commit is contained in:
Jean-Sébastien Pédron 2025-02-27 13:24:57 +01:00
parent 43916da581
commit 0e7f92aba2
No known key found for this signature in database
GPG Key ID: 39E99761A5FD94CC
2 changed files with 6 additions and 1 deletions

View File

@ -221,6 +221,7 @@ public class FailureTest {
() -> {
connected.set(false);
try { Thread.sleep(2000); } catch (Exception e) {}
Client locator =
cf.get(new Client.ClientParameters().port(streamPortNode2()));
// wait until there's a new leader
@ -467,6 +468,7 @@ public class FailureTest {
// avoid long-running task in the IO thread
executorService.submit(
() -> {
try { Thread.sleep(2000); } catch (Exception e) {}
Client.StreamMetadata m = metadataClient.metadata(stream).get(stream);
int newReplicaPort = m.getReplicas().get(0).getPort();

View File

@ -28,6 +28,7 @@ import com.rabbitmq.stream.impl.Client.ClientParameters;
import com.rabbitmq.stream.impl.Client.Response;
import com.rabbitmq.stream.impl.Client.StreamMetadata;
import java.util.Collections;
import java.time.Duration;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@ -57,7 +58,9 @@ public class LeaderLocatorTest {
void clientLocalLocatorShouldMakeLeaderOnConnectedNode() {
int[] ports = new int[] {TestUtils.streamPortNode1(), TestUtils.streamPortNode2()};
for (int port : ports) {
Client client = cf.get(new Client.ClientParameters().port(port));
Client client = cf.get(new Client.ClientParameters()
.port(port)
.rpcTimeout(Duration.ofSeconds(30)));
String s = UUID.randomUUID().toString();
try {
Response response =