Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed HostPortWaitStrategy throws NumberFormatException when port is exposed but not mapped #640

Merged
merged 2 commits into from
Apr 11, 2018

Conversation

barrycommins
Copy link
Contributor

Ports that were exposed but not mapped to a host port were throwing NumberFormatException when getMappedPort() was called on ContainerState.

E.g.

redis:
  image: redis
  ports:
    - 6379

when port is exposed but not mapped

public class DockerComposeExposedPortTest {

@Rule
Copy link
Member

Choose a reason for hiding this comment

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

could you please convert it to try-with-resources-style and maybe just add to some other Docker Compose test

@barrycommins
Copy link
Contributor Author

@bsideup

Updated as suggested. I just added an exposed port to one of the existing test docker-compose files, which causes several existing tests to fail without the fix, but pass with the fix.

@bsideup bsideup merged commit b5181f7 into testcontainers:master Apr 11, 2018
@bsideup
Copy link
Member

bsideup commented Apr 11, 2018

@barrycommins merged, thanks! 👍

@barrycommins barrycommins deleted the 640 branch April 11, 2018 22:42
@ilkinulas
Copy link

Are there any plans to release 1.7.1?

@bsideup
Copy link
Member

bsideup commented Apr 13, 2018

@ilkinulas yes, we will do a hotfix release later this week :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants