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

Setting ryuk.container.timeout causes a ClassCastException #684

Closed
jamieswogger opened this issue May 8, 2018 · 2 comments
Closed

Setting ryuk.container.timeout causes a ClassCastException #684

jamieswogger opened this issue May 8, 2018 · 2 comments
Labels
Milestone

Comments

@jamieswogger
Copy link
Contributor

Tried setting ryuk.container.timeout by creating a testcontainers.properties that contains the following:

ryuk.container.timeout=120

This is successfully picked up, but when TestcontainersConfiguration#getRyukTimeout is called is calls properties.getOrDefault, which returns a string "120" which is attempted to be cast to an Integer. This results in the following error:

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

A fix for this is to change TestcontainersConfiguration#getRyukTimeout to

public Integer getRyukTimeout() {
    return Integer.parseInt((String) properties.getOrDefault("ryuk.container.timeout", "30"));
}
@jamieswogger
Copy link
Contributor Author

I've created a pull request with the proposed fix. If that PR is approved and merged is it possible to release a patch soon with this fix?

#685

@bsideup
Copy link
Member

bsideup commented May 17, 2018

Released as 1.7.3

@bsideup bsideup closed this as completed May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants