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 {
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
Original file line number Diff line number Diff line change 2828import com .rabbitmq .stream .impl .Client .Response ;
2929import com .rabbitmq .stream .impl .Client .StreamMetadata ;
3030import java .util .Collections ;
31+ import java .time .Duration ;
3132import java .util .HashMap ;
3233import java .util .Map ;
3334import 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 =
You can’t perform that action at this time.
0 commit comments