File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
deps/rabbitmq_stream/test/rabbit_stream_SUITE_data/src/test/java/com/rabbitmq/stream Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,7 @@ void noLostConfirmedMessagesWhenLeaderGoesAway() throws Exception {
221
221
() -> {
222
222
connected .set (false );
223
223
224
+ try { Thread .sleep (2000 ); } catch (Exception e ) {}
224
225
Client locator =
225
226
cf .get (new Client .ClientParameters ().port (streamPortNode2 ()));
226
227
// wait until there's a new leader
@@ -467,6 +468,7 @@ void consumerReattachesToOtherReplicaWhenReplicaGoesAway() throws Exception {
467
468
// avoid long-running task in the IO thread
468
469
executorService .submit (
469
470
() -> {
471
+ try { Thread .sleep (2000 ); } catch (Exception e ) {}
470
472
Client .StreamMetadata m = metadataClient .metadata (stream ).get (stream );
471
473
int newReplicaPort = m .getReplicas ().get (0 ).getPort ();
472
474
Original file line number Diff line number Diff line change 28
28
import com .rabbitmq .stream .impl .Client .Response ;
29
29
import com .rabbitmq .stream .impl .Client .StreamMetadata ;
30
30
import java .util .Collections ;
31
+ import java .time .Duration ;
31
32
import java .util .HashMap ;
32
33
import java .util .Map ;
33
34
import java .util .Set ;
@@ -57,7 +58,9 @@ void invalidLocatorShouldReturnError() {
57
58
void clientLocalLocatorShouldMakeLeaderOnConnectedNode () {
58
59
int [] ports = new int [] {TestUtils .streamPortNode1 (), TestUtils .streamPortNode2 ()};
59
60
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 )));
61
64
String s = UUID .randomUUID ().toString ();
62
65
try {
63
66
Response response =
You can’t perform that action at this time.
0 commit comments