Files
JUnit_Tutorials/testcontainers2/docs/output/03-docker-api-version-bump-javap.txt
asmhatre fd3434c42d Add testcontainers2 module: Testcontainers 2.0 artifact renames, JUnit 4 removal, and the Docker API version bump
Verifies five claims against primary sources rather than release-note prose: the
org.testcontainers:junit-jupiter -> testcontainers-junit-jupiter rename (and the other 60 like
it, per OpenRewrite's own Testcontainers2Migration recipe), that GenericContainer no longer
implements org.junit.rules.TestRule anywhere in the 2.0.5 jar (confirmed exhaustively, not just
for this one class), the real compiler/dependency-resolution breaks from bumping only a version
number on existing JUnit 4 @ClassRule code, the literal 1.32 -> 1.44 default Docker API version
bump in DockerClientProviderStrategy's bytecode (tied to the real Docker Engine 29 compatibility
issue), and Spring Boot 4.1.1's BOM pinning 2.0.5. Built and tested with no Docker daemon
available; one test class demonstrates a clean @EnabledIfDockerAvailable skip, guarded at the
class level after the method-level guard was caught failing first.
2026-10-08 13:19:23 +00:00

38 lines
2.3 KiB
Plaintext

# unzipped from testcontainers-1.21.4.jar
$ javap -v -p org/testcontainers/dockerclient/DockerClientProviderStrategy.class
...
#773 = Utf8 Fallback to Docker API version 1.32.
#774 = String #773 // Fallback to Docker API version 1.32.
#775 = Utf8 VERSION_1_32
#777 = Fieldref org/testcontainers/shaded/com/github/dockerjava/core/RemoteApiVersion.VERSION_1_32:...
...
273: ldc_w #774 // String Fallback to Docker API version 1.32.
286: getstatic #777 // Field ...RemoteApiVersion.VERSION_1_32:...
# unzipped from testcontainers-2.0.5.jar instead
$ javap -v -p org/testcontainers/dockerclient/DockerClientProviderStrategy.class
...
#742 = Utf8 VERSION_1_44
#744 = Fieldref org/testcontainers/shaded/com/github/dockerjava/core/RemoteApiVersion.VERSION_1_44:...
#764 = Utf8 Pinging Docker API version 1.44.
#765 = String #764 // Pinging Docker API version 1.44.
...
208: getstatic #744 // Field ...RemoteApiVersion.VERSION_1_44:...
244: ldc_w #765 // String Pinging Docker API version 1.44.
# The hardcoded default Docker Engine API version this client falls back to moved from 1.32 to
# 1.44 somewhere between 1.21.4 and 2.0.5. The release notes for 2.0.2 say exactly that:
# "Set default docker API version to 1.44 (#11216) @eddumelendez" -
# https://github.com/testcontainers/testcontainers-java/releases/tag/2.0.2
#
# This is not a cosmetic bump. Docker Engine 29 (shipped inside Docker Desktop 4.52) raises its
# own *minimum accepted* client API version to 1.44, and rejects anything older outright:
# "client version 1.32 is too old. Minimum supported API version is 1.44, please upgrade
# your client to a newer version."
# reported against Testcontainers 1.21.3 in
# https://github.com/testcontainers/testcontainers-java/issues/11235 - closed as a duplicate,
# with multiple commenters confirming Testcontainers 2.0.2 works against the same Docker Desktop
# version where 1.21.x fails outright. A project pinned to the 1.x line has three options: set
# api.version=1.44 by hand in a ~/.docker-java.properties file, keep Docker Engine below 29, or move
# to 2.0.2+, where this is just the default.