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

Flaky port allocation tests #2281

Closed
oleg-nenashev opened this issue Jul 18, 2023 · 1 comment
Closed

Flaky port allocation tests #2281

oleg-nenashev opened this issue Jul 18, 2023 · 1 comment
Labels

Comments

@oleg-nenashev
Copy link
Member

Summary

When there are parallel builds, we hit the port conflicts in the tests. It would be great to refactor them to avoid the build failures, or at least return test warnings instead of failing the whole configuration run

Caused by:
        java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:44346
            at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
            at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:158)
            ... 59 more

            Caused by:
            java.io.IOException: Failed to bind to /0.0.0.0:44346
                at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
                at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:[304](https://github.com/wiremock/wiremock/actions/runs/5575535991/jobs/10211028348?pr=2267#step:9:305))
                at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402)
                at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
                at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
                at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
                at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
                at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
                at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
                at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
                at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
                at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
                at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
                at org.eclipse.jetty.server.Server.doStart(Server.java:398)
                at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
                at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
                ... 60 more

                Caused by:
                java.net.BindException: Address already in use
                    at java.base/sun.nio.ch.Net.bind0(Native Method)
                    at java.base/sun.nio.ch.Net.bind(Net.java:459)
                    at java.base/sun.nio.ch.Net.bind(Net.java:448)
                    at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
                    at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
                    ... 75 more

References

No response

@oleg-nenashev oleg-nenashev added the hacktoberfest Hacktoberfest label Oct 5, 2023
dkhozyainov pushed a commit to dkhozyainov/wiremock that referenced this issue Oct 6, 2023
dkhozyainov pushed a commit to dkhozyainov/wiremock that referenced this issue Oct 9, 2023
dkhozyainov pushed a commit to dkhozyainov/wiremock that referenced this issue Oct 9, 2023
dkhozyainov pushed a commit to dkhozyainov/wiremock that referenced this issue Oct 11, 2023
dkhozyainov pushed a commit to dkhozyainov/wiremock that referenced this issue Oct 17, 2023
dkhozyainov pushed a commit to dkhozyainov/wiremock that referenced this issue Oct 17, 2023
dkhozyainov pushed a commit to dkhozyainov/wiremock that referenced this issue Nov 4, 2023
tomakehurst pushed a commit that referenced this issue Nov 6, 2023
Retry startup up to 3 times when random port allocation fails.

---------

Co-authored-by: d.khoziainov <d.khoziainov@uzum.com>
henrik242 pushed a commit to henrik242/wiremock that referenced this issue Nov 10, 2023
Retry startup up to 3 times when random port allocation fails.

---------

Co-authored-by: d.khoziainov <d.khoziainov@uzum.com>
@oleg-nenashev
Copy link
Member Author

Closing as merged

Marvin9 pushed a commit to Marvin9/wiremock that referenced this issue Nov 20, 2023
Retry startup up to 3 times when random port allocation fails.

---------

Co-authored-by: d.khoziainov <d.khoziainov@uzum.com>
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

1 participant