Skip to content

Commit

Permalink
using newArrayList for withExposedPorts method in order to allow addE…
Browse files Browse the repository at this point in the history
…xposedPort later

fixes #451
  • Loading branch information
orange-buffalo committed Sep 8, 2017
1 parent 1d7cd9e commit 908d279
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import java.util.function.Consumer;
import java.util.stream.Collectors;

import static java.util.Arrays.asList;
import static com.google.common.collect.Lists.newArrayList;
import static org.testcontainers.containers.output.OutputFrame.OutputType.STDERR;
import static org.testcontainers.containers.output.OutputFrame.OutputType.STDOUT;
import static org.testcontainers.utility.CommandLine.runShellCommand;
Expand Down Expand Up @@ -554,7 +554,7 @@ protected void finished(Description description) {
*/
@Override
public SELF withExposedPorts(Integer... ports) {
this.setExposedPorts(asList(ports));
this.setExposedPorts(newArrayList(ports));
return self();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,9 @@ private BufferedReader getReaderForContainerPort80(GenericContainer container) {
return new BufferedReader(new InputStreamReader(socket.getInputStream()));
});
}

@Test
public void addExposedPortAfterWithExposedPortsTest() {
redis.addExposedPort(8987);
}
}

0 comments on commit 908d279

Please sign in to comment.