Skip to content

Commit 0e7f92a

Browse files
committed
rabbit_stream_SUITE: Increase some timeouts
1 parent 43916da commit 0e7f92a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/src/test/java/com/rabbitmq/stream/FailureTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ void noLostConfirmedMessagesWhenLeaderGoesAway() throws Exception {
221221
() -> {
222222
connected.set(false);
223223

224+
try { Thread.sleep(2000); } catch (Exception e) {}
224225
Client locator =
225226
cf.get(new Client.ClientParameters().port(streamPortNode2()));
226227
// wait until there's a new leader
@@ -467,6 +468,7 @@ void consumerReattachesToOtherReplicaWhenReplicaGoesAway() throws Exception {
467468
// avoid long-running task in the IO thread
468469
executorService.submit(
469470
() -> {
471+
try { Thread.sleep(2000); } catch (Exception e) {}
470472
Client.StreamMetadata m = metadataClient.metadata(stream).get(stream);
471473
int newReplicaPort = m.getReplicas().get(0).getPort();
472474

deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/src/test/java/com/rabbitmq/stream/LeaderLocatorTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import com.rabbitmq.stream.impl.Client.Response;
2929
import com.rabbitmq.stream.impl.Client.StreamMetadata;
3030
import java.util.Collections;
31+
import java.time.Duration;
3132
import java.util.HashMap;
3233
import java.util.Map;
3334
import java.util.Set;
@@ -57,7 +58,9 @@ void invalidLocatorShouldReturnError() {
5758
void clientLocalLocatorShouldMakeLeaderOnConnectedNode() {
5859
int[] ports = new int[] {TestUtils.streamPortNode1(), TestUtils.streamPortNode2()};
5960
for (int port : ports) {
60-
Client client = cf.get(new Client.ClientParameters().port(port));
61+
Client client = cf.get(new Client.ClientParameters()
62+
.port(port)
63+
.rpcTimeout(Duration.ofSeconds(30)));
6164
String s = UUID.randomUUID().toString();
6265
try {
6366
Response response =

0 commit comments

Comments
 (0)