-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
feat: Extend the "wait until file exists" API to distinguish between the test host and container filesystem #1009
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
cd093ed
to
37063ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your pull request. This is some kind of on purpose, but I understand the confusion regarding the wait strategy. I would like to suggest the following in order to avoid breaking existing configurations:
- Enhance the
UntilFileExists(string)
documentation (interface) and make it more explicit that it checks for a file on the test host. - Add an overloaded method that checks for the file inside the container.
We can also introduce two explicit APIs (wait strategies): One that checks on the test host and another that checks in the container, while deprecating the old one. My goal is to avoid introducing breaking changes without informing the developers.
Good point. Should I move the code into a |
Yes, I think that would be a better and more explicit approach. I am currently thinking how we can enhance the wait strategy API in a broader sense, without the need for a complete overhaul. The wait strategy API has remained unchanged since its early days. Perhaps an approach similar to the |
I see that the And do you have any suggestions for what to call the scope enum? |
No, I think your suggestion is reasonable.
|
I have updated the code as per our discussion. I was unsure of where to put the |
I took a brief look. It looks very good. Great first contribution, thanks. I won't be able to finalize the review today, but I can certainly do it tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR and addressing the requests. Great first contribution, thanks 👍.
What does this PR do?
The existing implementation of the UntilFileExists WaitStrategy seems to look for a file in the host's file system instead of the container's.
This PR changes that so UntilFileExists looks for the file in the container's file system instead.
Why is it important?
Looking for a file on the host instead of the container seems like incorrect behavior.