Skip to content

Upgrade Testcontainers from 1.20.1 to 2.0.5#4903

Open
porunov wants to merge 1 commit into
JanusGraph:masterfrom
porunov:upgrade-testcontainers-2
Open

Upgrade Testcontainers from 1.20.1 to 2.0.5#4903
porunov wants to merge 1 commit into
JanusGraph:masterfrom
porunov:upgrade-testcontainers-2

Conversation

@porunov

@porunov porunov commented Jun 27, 2026

Copy link
Copy Markdown
Member

Testcontainers 1.x bundles a docker-java client that defaults to Docker Engine API version 1.32. Docker Engine 29 raised its minimum supported API version to 1.40 and rejects older clients, so every Testcontainers-based test fails to find a valid Docker environment ("client version 1.32 is too old"). Pinning the API version on 1.x is insufficient because 1.x's environment detection itself fails against Docker 29. Testcontainers 2.0.x negotiates a compatible API version and restores compatibility with current Docker.

Testcontainers 2.0 renamed its Maven modules with a testcontainers- prefix (e.g. org.testcontainers:cassandra -> org.testcontainers:testcontainers-cassandra), so the dependency artifactIds are updated accordingly. The Java packages are unchanged in 2.0, so no test source changes are required. Testcontainers 2.0.0+ is compiled for Java 8 bytecode and therefore remains compatible with JanusGraph's build.

Verified locally against Docker Engine 29 that the CQL, HBase, Elasticsearch and Solr Testcontainers tests start their containers and pass.


Thank you for contributing to JanusGraph!

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there an issue associated with this PR? Is it referenced in the commit message?
  • Does your PR body contain #xyz where xyz is the issue number you are trying to resolve?
  • Has your PR been rebased against the latest commit within the target branch (typically master)?
  • Is your initial contribution a single, squashed commit?

For code changes:

  • Have you written and/or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE.txt file, including the main LICENSE.txt file in the root of this repository?
  • If applicable, have you updated the NOTICE.txt file, including the main NOTICE.txt file found in the root of this repository?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Testcontainers 1.x bundles a docker-java client that defaults to Docker Engine
API version 1.32. Docker Engine 29 raised its minimum supported API version to
1.40 and rejects older clients, so every Testcontainers-based test fails to find
a valid Docker environment ("client version 1.32 is too old"). Pinning the API
version on 1.x is insufficient because 1.x's environment detection itself fails
against Docker 29. Testcontainers 2.0.x negotiates a compatible API version and
restores compatibility with current Docker.

Testcontainers 2.0 renamed its Maven modules with a `testcontainers-` prefix
(e.g. `org.testcontainers:cassandra` -> `org.testcontainers:testcontainers-cassandra`),
so the dependency artifactIds are updated accordingly. The Java packages are
unchanged in 2.0, so no test source changes are required. Testcontainers 2.0.0+
is compiled for Java 8 bytecode and therefore remains compatible with
JanusGraph's build.

Verified locally against Docker Engine 29 that the CQL, HBase, Elasticsearch and
Solr Testcontainers tests start their containers and pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
@porunov porunov added this to the 1.2.0 milestone Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant