You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests should execute successfully, preusumably with a "reset Jenkins" instance since the default operating mode for Jenkins test instance lifecycle is per-method (see docs and @TestInstance)
Actual Results
[ERROR] org.jvnet.hudson.test.junit.jupiter.JenkinsRuleConstructorResolverTest.secondTest -- Time elapsed: 0.002 s <<< ERROR!
org.junit.jupiter.api.extension.ParameterResolutionException: Failed to bind to localhost/127.0.0.1:58115
at org.jvnet.hudson.test.junit.jupiter.JenkinsExtension.resolveParameter(JenkinsExtension.java:107)
at java.base/java.util.Optional.orElseGet(Optional.java:364)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: java.io.IOException: Failed to bind to localhost/127.0.0.1:58115
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
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:197)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
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:596)
at org.eclipse.jetty.server.Server.doStart(Server.java:398)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.jvnet.hudson.test.JenkinsRule._createWebServer(JenkinsRule.java:885)
at org.jvnet.hudson.test.JenkinsRule.createWebServer(JenkinsRule.java:803)
at org.jvnet.hudson.test.JenkinsRule.createWebServer(JenkinsRule.java:791)
at org.jvnet.hudson.test.JenkinsRule.newHudson(JenkinsRule.java:741)
at org.jvnet.hudson.test.JenkinsRule.before(JenkinsRule.java:409)
at org.jvnet.hudson.test.junit.jupiter.JenkinsExtension.resolveParameter(JenkinsExtension.java:104)
... 3 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:555)
at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:337)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294)
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
... 23 more
Test fails to execute due to a binding exception
Anything else?
No response
Are you interested in contributing a fix?
Yes, would like to improve the JUnit 5 support in a few other ways with other issues I've found (like with @JenkinsRecipe as well)
The text was updated successfully, but these errors were encountered:
mkobit
changed the title
JUnit 5 Extension fails on constructor injection with multiple test methods
JUnit Jupiter Extension fails on constructor injection with multiple test methods
Jan 23, 2024
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
N/A
Reproduction steps
Expected Results
Tests should execute successfully, preusumably with a "reset Jenkins" instance since the default operating mode for Jenkins test instance lifecycle is per-method (see docs and
@TestInstance
)Actual Results
Test fails to execute due to a binding exception
Anything else?
No response
Are you interested in contributing a fix?
Yes, would like to improve the JUnit 5 support in a few other ways with other issues I've found (like with
@JenkinsRecipe
as well)The text was updated successfully, but these errors were encountered: