Skip to content

Commit 979526b

Browse files
committed
Null-check connection name in test
1 parent ac8fab3 commit 979526b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/com/rabbitmq/stream/impl/StreamEnvironmentTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,12 @@ void shouldHaveSeveralLocatorsWhenSeveralUrisSpecifiedAndShouldRecoverThemIfClos
408408
() ->
409409
Cli.listConnections().stream()
410410
.map(ConnectionInfo::clientProvidedName)
411-
.filter(name -> name.contains("-locator-"))
411+
.filter(name -> name != null && name.contains("-locator-"))
412412
.collect(toList());
413413
List<String> locatorConnectionNames = locatorConnectionNamesSupplier.get();
414414
assertThat(locatorConnectionNames).hasSameSizeAs(uris);
415415

416-
locatorConnectionNames.forEach(connectionName -> Cli.killConnection(connectionName));
416+
locatorConnectionNames.forEach(Cli::killConnection);
417417

418418
environment.streamCreator().stream(s).create();
419419
try {

0 commit comments

Comments
 (0)