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

fix: correctly evaluate predicates in HttpWaitStrategy #450

Merged

Conversation

abendi
Copy link
Contributor

@abendi abendi commented Feb 13, 2023

this.predicates.every((predicate) => predicate(response)) in HttpWaitStrategy always resolved to true, because Promise objects were tested, which are always truthy. Fixing it by looping over predicates with async for..of.

Not too sure about the timeout tests, they add a bit of time.

@cristianrgreco cristianrgreco added bug Something isn't working patch Backward compatible bug fix labels Feb 14, 2023
@cristianrgreco
Copy link
Collaborator

Thanks for raising @abendi

@cristianrgreco cristianrgreco merged commit af72dc1 into testcontainers:master Feb 14, 2023
@abendi abendi deleted the fix-httpwaitstrategy-predicates branch February 14, 2023 14:47
@cristianrgreco
Copy link
Collaborator

Released in 9.1.3, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch Backward compatible bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants