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

Allow testcontainer to wait for a specific port #703

Merged
merged 3 commits into from
May 18, 2018

Conversation

sijie
Copy link
Contributor

@sijie sijie commented May 18, 2018

Motivation

A container might expose multiple ports for different purposes. for example, it can have a port for http endpoint,
while having another port for grpc endpoint. So when doing a liveness check, it would be better to allow configuring
checking a specific port, rather than checking the first exposed port.

Modification

Modify the HttpWaitStrategy to allow configuring the liveness port.

*Motivation*

A container might expose multiple ports for different purposes. for example, it can have a port for http endpoint,
while having another port for grpc endpoint. So when doing a liveness check, it would be better to allow configuring
checking a specific port, rather than checking the first exposed port.

*Modification*

Modify the `HttpWaitStrategy` to allow configuring the liveness port.
@bsideup bsideup added this to the next milestone May 18, 2018
Copy link
Member

@bsideup bsideup left a comment

Choose a reason for hiding this comment

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

Nice one, thanks!
Just a minor comment about the log level

Also, could you please add it to CHANGELOG.md?

@@ -138,13 +157,18 @@ protected void waitUntilReady() {
connection.setRequestMethod("GET");
connection.connect();

log.info("Get response code {}", connection.getResponseCode());
Copy link
Member

Choose a reason for hiding this comment

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

I would change this (and Get response {}) to .debug or even .trace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bsideup thank you for review.

I changed the logging from INFO to TRACE and added an item to changelog.md.

Let me know if that looks better now :)

- add an item in CHANGELOG.md
@bsideup bsideup merged commit 0aeaec3 into testcontainers:master May 18, 2018
@bsideup
Copy link
Member

bsideup commented May 18, 2018

@sijie merged, thanks! 👍

@sijie
Copy link
Contributor Author

sijie commented May 18, 2018

thank you @bsideup

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.

2 participants