kubernetes: testKubernetesComponent is failing on the quarkus-platform
Bug description
While releasing Camel Quarkus 3.8.0, test below was failing:
- org.apache.camel.quarkus.component.kubernetes.it.KubernetesTest.testKubernetesComponent
java.lang.RuntimeException: java.lang.NoSuchMethodError: 'void okhttp3.internal.Internal.initializeInstanceForTests()'
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.NoSuchMethodError: 'void okhttp3.internal.Internal.initializeInstanceForTests()'
at okhttp3.mockwebserver.MockWebServer.<clinit>(MockWebServer.java:103)
See https://github.com/apache/camel-quarkus/pull/5806.
I'll close this, as the test is passing again thanks to some dependency overrides. And we have added a permanent fix in #5806.
Reopening because my 'fix' actually didn't do anything, since the problem mockwebserver dependency isn't actually getting added to the BOM 🤦.
@jamesnetherton this line in quarkus-platform https://github.com/quarkusio/quarkus-platform/blob/3.8/pom.xml#L385-L386 could be removed?
@jamesnetherton this line in
quarkus-platformhttps://github.com/quarkusio/quarkus-platform/blob/3.8/pom.xml#L385-L386 could be removed?
No, I don't think so. While mockwebserver is not in our BOM and the k8s client still aligns with okhttp 3.x, the dependency tree ends up being a mess when tests run because IIRC the universe BOM is used:
https://github.com/quarkusio/quarkus-platform/blob/3.8/generated-platform-project/quarkus-universe/bom/pom.xml
Seems to work as of Camel Quarkus 3.15.0