quarkiverse / quarkus-wiremock

Quarkus extension for launching an in-process Wiremock server
https://wiremock.org/
Apache License 2.0
16 stars 10 forks source link

port doesn't seem to be random #82

Closed edeandrea closed 7 months ago

edeandrea commented 9 months ago

I'm not doing any explicit configuration for quarkus.wiremock.devservices.port and it seems to always pick port 8089. This makes it impossible to run dev mode with continuous testing because both server instances pick port 8089.

image

This is the error I get in the dev mode console when i hit r to resume tests:

13:42:45 ERROR [io.qu.test] (Test runner thread) ==================== TEST REPORT #1 ====================
13:42:45 ERROR [io.qu.test] (Test runner thread) Test NarrationServiceTests#narrateFallback() failed 
: java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkiverse.wiremock.devservice.WireMockServerProcessor#setup threw an exception: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:166)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.startWireMockDevService(WireMockServerProcessor.java:64)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.setup(WireMockServerProcessor.java:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:164)
        ... 13 more
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
        at wiremock.org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
        at wiremock.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 wiremock.org.eclipse.jetty.server.Server.doStart(Server.java:398)
        at wiremock.org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
        ... 14 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 wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
        ... 29 more

        at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:638)
        at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:722)
        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.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkiverse.wiremock.devservice.WireMockServerProcessor#setup threw an exception: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:166)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.startWireMockDevService(WireMockServerProcessor.java:64)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.setup(WireMockServerProcessor.java:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:164)
        ... 13 more
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
        at wiremock.org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
        at wiremock.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 wiremock.org.eclipse.jetty.server.Server.doStart(Server.java:398)
        at wiremock.org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
        ... 14 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 wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
        ... 29 more

        at io.quarkus.runner.bootstraptActionImpl.runAugment(AugmentActionImpl.java:334)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:251)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60)
        at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:224)
        at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:605)
        at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:655)
        ... 1 more
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkiverse.wiremock.devservice.WireMockServerProcessor#setup threw an exception: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:166)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.startWireMockDevService(WireMockServerProcessor.java:64)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.setup(WireMockServerProcessor.java:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:164)
        ... 13 more
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
        at wiremock.org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
        at wiremock.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 wiremock.org.eclipse.jetty.server.Server.doStart(Server.java:398)
        at wiremock.org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
        ... 14 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 wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
        ... 29 more

        at io.quarkus.builder.Execution.run(Execution.java:123)
        at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
        at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:160)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:330)
        ... 6 more
Caused by: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:166)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.startWireMockDevService(WireMockServerProcessor.java:64)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.setup(WireMockServerProcessor.java:51)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:164)
        ... 10 more
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
        at wiremock.org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
        at wiremock.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 wiremock.org.eclipse.jetty.server.Server.doStart(Server.java:398)
        at wiremock.org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
        ... 11 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 wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
        ... 26 more

13:42:45 ERROR [io.qu.test] (Test runner thread) Test ContractVerificationTests#rest-fights - A hello request failed 
: java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkiverse.wiremock.devservice.WireMockServerProcessor#setup threw an exception: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:166)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.startWireMockDevService(WireMockServerProcessor.java:64)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.setup(WireMockServerProcessor.java:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:164)
        ... 13 more
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
        at wiremock.org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
        at wiremock.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 wiremock.org.eclipse.jetty.server.Server.doStart(Server.java:398)
        at wiremock.org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
        ... 14 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 wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
        ... 29 more

        at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:638)
        at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:722)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        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.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
        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 java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkiverse.wiremock.devservice.WireMockServerProcessor#setup threw an exception: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:166)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.startWireMockDevService(WireMockServerProcessor.java:64)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.setup(WireMockServerProcessor.java:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:164)
        ... 13 more
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
        at wiremock.org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
        at wiremock.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/javatream.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 wiremock.org.eclipse.jetty.server.Server.doStart(Server.java:398)
        at wiremock.org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
        ... 14 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 wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
        ... 29 more

        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:334)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:251)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60)
        at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:224)
        at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:605)
        at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:655)
        ... 1 more
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkiverse.wiremock.devservice.WireMockServerProcessor#setup threw an exception: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:166)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.startWireMockDevService(WireMockServerProcessor.java:64)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.setup(WireMockServerProcessor.java:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:164)
        ... 13 more
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
        at wiremock.org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
        at wiremock.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 wiremock.org.eclipse.jetty.server.Server.doStart(Server.java:398)
        at wiremock.org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
        ... 14 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 wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
        ... 29 more

        at io.quarkus.builder.Execution.run(Execution.java:123)
        at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
        at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:160)
        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:330)
        ... 6 more
Caused by: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:166)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.startWireMockDevService(WireMockServerProcessor.java:64)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.setup(WireMockServerProcessor.java:51)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:164)
        ... 10 more
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
        at wiremock.org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
        at wiremock.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)
    java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at wiremock.org.eclipse.jetty.server.Server.doStart(Server.java:398)
        at wiremock.org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
        ... 11 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 wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
        ... 26 more

13:42:45 ERROR [io.qu.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> Summary: <<<<<<<<<<<<<<<<<<<<
NarrationServiceTests#narrateFallback() java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkiverse.wiremock.devservice.WireMockServerProcessor#setup threw an exception: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:166)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.startWireMockDevService(WireMockServerProcessor.java:64)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.setup(WireMockServerProcessor.java:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:164)
        ... 13 more
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
        at wiremock.org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
        at wiremock.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 wiremock.org.eclipse.jetty.server.Server.doStart(Server.java:398)
        at wiremock.org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
        ... 14 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 wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
        ... 29 more
ContractVerificationTests#rest-fights - A hello request java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkiverse.wiremock.devservice.WireMockServerProcessor#setup threw an exception: com.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:166)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.startWireMockDevService(WireMockServerProcessor.java:64)
        at io.quarkiverse.wiremock.devservice.WireMockServerProcessor.setup(WireMockServerProcessor.java:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:198)
        at com.github.tomakehurst.wiremock.WireMockServer.start(WireMockServer.java:164)
        ... 13 more
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8089
        at wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
        at wiremock.org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
        at wiremock.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 wiremock.org.eclipse.jetty.server.Server.doStart(Server.java:398)
        at wiremock.org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start(JettyHttpServer.java:196)
        ... 14 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 wiremock.org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
        ... 29 more

13:42:45 ERROR [io.qu.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> 2 TESTS FAILED <<<<<<<<<<<<<<<<<<<<
chberger commented 9 months ago

The dynamic port allocation feature hasn't been published yet. The implementation is just merged into main, but not part of any release. I'm going to release 1.1 asap, which removes the profile prefixed configuration approach and contains the dynamic port allocation feature when no default port is given.

I'd love to take that 1.1 version as the new baseline to see what else is not working. I can imagine that some issues might be solved once the config must not be prefixed with the dev & test profile anymore.

oleg-nenashev commented 9 months ago

it's live now: https://github.com/quarkiverse/quarkus-wiremock/releases/tag/1.1.0

edeandrea commented 8 months ago

Thanks @oleg-nenashev & @chberger!

I'll integrate this now into the superheroes.

One thing I've noticed, though, is that doing something like custom.config.wiremock.url=http://localhost:${quarkus.wiremock.devservices.port}/mock-me in an integration test in conjunction with quarkus.container-image.build=true doesn't work.

This is because wiremock is running within the JVM of the integration test, so when the app in the container image starts up, localhost is not accessible to the container. In this situation the host actually needs to be host.docker.internal.

I've done something very "hacky" in my integration test to get around this, using a QuarkusTestProfile:

  public static class WiremockOpenAITestProfile implements QuarkusTestProfile {
    @Override
    public Map<String, String> getConfigOverrides() {
      var hostname = Boolean.getBoolean("quarkus.container-image.build") ? "host.docker.internal" : "localhost";

      return Map.of(
        "quarkus.langchain4j.openai.base-url", "http://%s:${%s}/v1/".formatted(hostname, WireMockConfigKey.PORT)
      );
    }
  }

This also means that when you run on something like GitHub actions, you also need to do -Dquarkus.test.arg-line="--add-host host.docker.internal:host-gateway" so that host.docker.internal is even available.

The only other way I could think about solving this would be to run wiremock in a container rather than in jvm.

chberger commented 8 months ago

Thanks @edeandrea! Yeah, you are absolutely right. WireMock runs in the JVM of the integration test, so the app in the container cannot access WireMock via localhost. We've already discussed that in this thread where my idea was to use host.docker.internal as well, at least for Docker. It seems like you came up with a configuration idea which works for this setup. 👍

Anyway, I think running WireMock in a container would solve this issue, at least when the WireMock container and the app container share the same network. However, running WireMock in a container would also add another layer of complexity which I try to avoid ...

Right now, I'm trying to provide the basic functionality first (see all your open issues 😊). Once this extension is mature enough I could imagine to provide a container flavor as well. However, as long as we don't have any show-stopper yet, I'd prefer to continue with the JVM approach.

edeandrea commented 8 months ago

I agree that the jvm approach is less headaches. I was just merely pointing it out is all.

chberger commented 7 months ago

@edeandrea: Could you confirm that the problem has been solved with the latest version?

I would love to add an example for integration tests to the offical quarkus-wiremock documentation, especially when the app runs in a container. May I document your approach as mentioned below?

I've done something very "hacky" in my integration test to get around this, using a QuarkusTestProfile:

  public static class WiremockOpenAITestProfile implements QuarkusTestProfile {
    @Override
    public Map<String, String> getConfigOverrides() {
      var hostname = Boolean.getBoolean("quarkus.container-image.build") ? "host.docker.internal" : "localhost";

      return Map.of(
        "quarkus.langchain4j.openai.base-url", "http://%s:${%s}/v1/".formatted(hostname, WireMockConfigKey.PORT)
      );
    }
  }

This also means that when you run on something like GitHub actions, you also need to do -Dquarkus.test.arg-line="--add-host host.docker.internal:host-gateway" so that host.docker.internal is even available.

The only other way I could think about solving this would be to run wiremock in a container rather than in jvm.

Furthermore, it would be nice to link the quarkus-super-heroes repo to showcase the extension in action. Would this be OK for you?

edeandrea commented 7 months ago

Hi @chberger !

The random port problem looks like it has been solved with the 1.1.1 version, although it seems to show up in the dev ui twice? I'm not sure what thats about (or whether its an issue with the extension).

image

I would love to add an example for integration tests to the official quarkus-wiremock documentation, especially when the app runs in a container. May I document your approach as mentioned below?

Absolutely! Also, don't forget about that if using GitHub actions you need to add something like -Dquarkus.test.arg-line="--add-host host.docker.internal:host-gateway" so that host.docker.internal is even available.

Furthermore, it would be nice to link the quarkus-super-heroes repo to showcase the extension in action. Would this be OK for you?

Of course it would! Althought I am the primary maintainer of the repo, it isn't just "mine". Its the official sample application for Quarkus, so it would make sense to showcase it!

chberger commented 7 months ago

Hi @edeandrea !

The random port problem looks like it has been solved with the 1.1.1 version, although it seems to show up in the dev ui twice? I'm not sure what thats about (or whether its an issue with the extension).

Ok, this looks strange. Let me try to reproduce that.

Absolutely! Also, don't forget about that if using GitHub actions you need to add something like -Dquarkus.test.arg-line="--add-host host.docker.internal:host-gateway" so that host.docker.internal is even available.

Sure. Thanks!

Of course it would! Althought I am the primary maintainer of the repo, it isn't just "mine". Its the official sample application for Quarkus, so it would make sense to showcase it!

Yeah, I'm aware of that. I thought I'd ask anyway before referencing other work.

chberger commented 7 months ago

The random port problem looks like it has been solved with the 1.1.1 version

oleg-nenashev commented 6 months ago

Created https://github.com/quarkiverse/quarkus-wiremock/issues/106 for the collision between normal and integration tests