File tree 2 files changed +6
-2
lines changed
src/test/java/com/rabbitmq/stream/impl 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -901,13 +901,15 @@ void methodsShouldThrowExceptionWhenConsumerIsClosed() {
901
901
@ Test
902
902
void creationShouldFailWithDetailsWhenUnknownHost () {
903
903
Address localhost = localhost ();
904
+ // first connection is locator
905
+ AtomicInteger connectionCount = new AtomicInteger (0 );
904
906
EnvironmentBuilder builder =
905
907
environmentBuilder ()
906
908
.host (localhost .host ())
907
909
.port (localhost .port ())
908
910
.addressResolver (
909
911
n ->
910
- n . equals ( localhost )
912
+ connectionCount . getAndIncrement () == 0
911
913
? n
912
914
: new Address (UUID .randomUUID ().toString (), Client .DEFAULT_PORT ));
913
915
try (Environment env = builder .build ()) {
Original file line number Diff line number Diff line change @@ -644,13 +644,15 @@ void methodsShouldThrowExceptionWhenProducerIsClosed() throws InterruptedExcepti
644
644
@ Test
645
645
void creationShouldFailWithDetailsWhenUnknownHost () {
646
646
Address localhost = localhost ();
647
+ // first connection is locator
648
+ AtomicInteger connectionCount = new AtomicInteger (0 );
647
649
EnvironmentBuilder builder =
648
650
environmentBuilder ()
649
651
.host (localhost .host ())
650
652
.port (localhost .port ())
651
653
.addressResolver (
652
654
n ->
653
- n . equals ( localhost )
655
+ connectionCount . getAndIncrement () == 0
654
656
? n
655
657
: new Address (UUID .randomUUID ().toString (), Client .DEFAULT_PORT ));
656
658
try (Environment env = builder .build ()) {
You can’t perform that action at this time.
0 commit comments