-
Notifications
You must be signed in to change notification settings - Fork 9
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
Be compatible with IPv6 system #4
base: master
Are you sure you want to change the base?
Conversation
Hi. Sorry for the late reply. First of all thank you for your contribution. While reviewing your changes, I've realised I'm not quite sure about the problem you are facing.
|
HI, Thank you for your reply. My main issue is neither on my host file system and my container file system the /proc/self/net/tcp6 exist. I assumed that this is because my host doesn't yet compatible with IPv6. And so my container can't have IPv6 on non IPv6 host. That is why on isIPv6System i just check if the file exists in my host file system. |
I'm facing another issue (not related to this one) but it can have a huge impact on the lib. I use an Oracle image to do my tests. When I first create the container, in background it configures the database and create the schema. The port is available before my schema are created and so the lib give me back control too early. My only way to know if my database is ready is by reading the output log of the container, i must found : Do you have any idea how to deal with that? It seams that Junit testContainer has a way to do that : public GenericContainer containerWithLogWait = new GenericContainer("redis:5.0.3") (cf: https://www.testcontainers.org/features/startup_and_waits/) |
I think it could be done the same way. Just monitoring output of a container and waiting for predefined template to match. |
I think this could be easily done using shell. So instead of executing |
I'm sorry for the late reply but I was quite busy. What do you think? |
Thank you I'm gonna test It today and repush if it works. |
pgarrabos/notIpv6System Conflicts: src/main/java/me/bazhenov/docker/Docker.java
I did not finish and it's not working yet (i need also to do some refactoring) but just to give you an idea of how I see it : https://github.com/pGarrabos/docker-testng-integration/tree/wip/startconditions I created a new annotation StartCondition that has 3 parameters Condition class (Condition is an interface that represent a condition that has to be fulfil to assume that the container is ready for the test), parameters that are the parameters for the conditions and timeout. Are you ok with this design or do we need to review it completely ? |
As far as I understand your design is supposed to be used like:
I think it could be simplified both in terms of usage scenario and implementation details. How about:
It could be used more easily. Also current solution (with |
Yes you understood well. I agree with you that only adding waitForStdoutPatternMatch looks easier but it's less extendable. Notice also that TestContainer also give a way to create our own start condition. |
Well, maybe we could take best of two words. What if we implement annotations in my way and internal SPI in your way. So in most cases when client using standard wait conditions he can use simple form of:
but in case client need custom client condition he or she can implement it and use in a programmatic way.
I think this should not be a problem in non standard cases. What do you think? |
I think this is a good idea. We can try to implement it. |
Be compatible with IPv6 system