Skip to content
Advertisement

Integration tests with WireMock failing because no ALPN Processors are found

I’m writing some integration tests for a Spring Boot application written in Kotlin. To stub some HTTP requests, I’m using WireMock via spring-cloud-contract-wiremock as dependency.

Some anonymized sample code from an integration test:

JavaScript

While running these tests on my local machine, everything is working fine. On the CI/CD environment it’s failing though with the following error:

JavaScript

I did some searching and figured out is has to do with Jetty missing some things on the class path. I added the following dependency testImplementation("org.eclipse.jetty:jetty-alpn-server:11.0.7"), but the tests are still failing. The alpn-boot extension should not be necessary as JDK 11 is being used.

Anyone able to help me solve this? Do I need another dependency or am I looking in the wrong direction?

Advertisement

Answer

Wiremock team addressed this in version 2.32, there’s a ticket here. You need to specify a correct version for wiremock-jre8-standalone to override an older version pulled by Spring:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement