The container tests currently use different MockServer client and server versions.
#9622 updated mockserver-client-java-no-dependencies from 7.4.0 to 7.5.0, but
BasicMockServerTest.MOCKSERVER_IMAGE still uses the
mockserver/mockserver:mockserver-7.4.0 image.
MockServer rejects requests when the client and server major or minor versions
do not match. As a result, all container tests fail while registering
expectations, before making an OkHttp request.
Reproduction
From the current main branch:
./gradlew :container-tests:test -PcontainerTests=true
This produces failures such as:
org.mockserver.client.ClientException:
Client version "7.5.0" major and minor versions do not match
server version "7.4.0"
The Loom configuration reproduces the same problem:
./gradlew :container-tests:test \
-PcontainerTests=true \
-Pokhttp.platform=loom \
-Ptest.java.version=24
All 12 container tests fail in the Loom configuration. The same failure can
also be seen in the Loom job for #9622:
https://github.com/lysine-dev/okhttp/actions/runs/30490484586/job/90706867182
Expected behavior
The MockServer client and container image use compatible versions, and the
container tests pass.
Proposed fix
Update the container image to match the client version:
-.withTag("mockserver-7.4.0")
+.withTag("mockserver-7.5.0")
I verified this change with both commands above. All 12 container tests pass
with the Loom configuration.
The container tests currently use different MockServer client and server versions.
#9622 updated
mockserver-client-java-no-dependenciesfrom 7.4.0 to 7.5.0, butBasicMockServerTest.MOCKSERVER_IMAGEstill uses themockserver/mockserver:mockserver-7.4.0image.MockServer rejects requests when the client and server major or minor versions
do not match. As a result, all container tests fail while registering
expectations, before making an OkHttp request.
Reproduction
From the current
mainbranch:This produces failures such as:
The Loom configuration reproduces the same problem:
All 12 container tests fail in the Loom configuration. The same failure can
also be seen in the Loom job for #9622:
https://github.com/lysine-dev/okhttp/actions/runs/30490484586/job/90706867182
Expected behavior
The MockServer client and container image use compatible versions, and the
container tests pass.
Proposed fix
Update the container image to match the client version:
I verified this change with both commands above. All 12 container tests pass
with the Loom configuration.