Skip to content

Using newArrayList for withExposedPorts method in order to allow addExposedPort later#453

Merged
rnorth merged 1 commit into
testcontainers:masterfrom
orange-buffalo:#451
Sep 16, 2017
Merged

Using newArrayList for withExposedPorts method in order to allow addExposedPort later#453
rnorth merged 1 commit into
testcontainers:masterfrom
orange-buffalo:#451

Conversation

@orange-buffalo
Copy link
Copy Markdown
Contributor

Reproducer and fix for #451

@Test
public void addExposedPortAfterWithExposedPortsTest() {
redis.addExposedPort(8987);
assertThat("Both ports should be exposed", redis.getExposedPorts().size(), equalTo(2));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to use containsInAnyOrder instead of this series of assertions, but it is not available in dependencies and I don't feel like I can add it just for this case.

@rnorth
Copy link
Copy Markdown
Member

rnorth commented Sep 16, 2017

This looks sensible to me. Thank you for contributing!

@rnorth rnorth merged commit ecb3286 into testcontainers:master Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants