Open slominskir opened 4 years ago
@slominskir Have you fixed that? I tried running the test and it failed on testUnresponsiveCode60()
.
How did it fail? I worked around this issue by simply not having more than one execInContainer invocation between container restarts. Not a great fix though.
I tried ./gradlew test
and it failed with
java.lang.AssertionError: expected:<60> but was:<0>
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.failNotEquals(Assert.java:835)
at org.junit.Assert.assertEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:633)
at org.jlab.epics2web.IntegrationErrorTest.testUnresponsiveCode60(IntegrationErrorTest.java:278)
It didn't hang though, so I could't reproduce the issue. Other test methods were green.
@vcvitaly Did you run git pull first? Are you at revision 89c4d08? All tests pass for me. I ran:
git pull
Already up-to-date.
gradlew clean
gradlew test
...
BUILD SUCCESSFUL in 36s
4 actionable tasks: 4 executed
I'm on Windows 10 if that matters? The test in question disables the network interface in the test container in an attempt to trigger an "unresponsive" error code - maybe different OS stacks have an effect, though I wouldn't think so because I'm testing an application level timeout.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.
Running Docker Desktop Windows 2.1.0.5 and using JUnit 4 with annotations BeforeClass and AfterClass to setup a container that multiple Test cases can be run against. Each test case does an execInContainer. Each test works if run separately. If entire Test class is run then whatever the second execInContainer that is run will hang. Using docker command line tools I can exec a shell to the container created by testcontainers and see that the command specified in execInContainer is not running. If I attach a debugger I see that the execInContainer is parked waiting for a response. Stack trace:
Any tips to troubleshoot this? The project in question can be obtained from GitHub and uses Gradle to execute the tests: https://github.com/JeffersonLab/epics2web