File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
core/src/test/java/org/testcontainers/containers Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 2323public class ExposedHostTest {
2424
2525 private static HttpServer server ;
26+
2627 private static Network network ;
2728
2829 @ BeforeClass
@@ -190,23 +191,25 @@ private static Network createReusableNetwork(UUID name) {
190191 .listNetworksCmd ()
191192 .exec ()
192193 .stream ()
193- .filter (network ->
194- network .getName ().equals (name .toString ()) &&
195- network .getLabels ().equals (DockerClientFactory .DEFAULT_LABELS )
196- )
194+ .filter (network -> {
195+ return (
196+ network .getName ().equals (name .toString ()) &&
197+ network .getLabels ().equals (DockerClientFactory .DEFAULT_LABELS )
198+ );
199+ })
197200 .map (com .github .dockerjava .api .model .Network ::getId )
198201 .findFirst ()
199- .orElseGet (() ->
200- DockerClientFactory
202+ .orElseGet (() -> {
203+ return DockerClientFactory
201204 .instance ()
202205 .client ()
203206 .createNetworkCmd ()
204207 .withName (name .toString ())
205208 .withCheckDuplicate (true )
206209 .withLabels (DockerClientFactory .DEFAULT_LABELS )
207210 .exec ()
208- .getId ()
209- );
211+ .getId ();
212+ } );
210213
211214 return new Network () {
212215 @ Override
You can’t perform that action at this time.
0 commit comments