Skip to content

feat!: Testcontainers 2.x - #8

Merged
MetallFoX merged 1 commit into
mainfrom
feature/testcontainers-2
Aug 12, 2026
Merged

MetallFoX merged 1 commit into
mainfrom
feature/testcontainers-2

Conversation

@MetallFoX

@MetallFoX MetallFoX commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator

Testcontainers 2 renamed every module artifact — postgresql to testcontainers-postgresql, jdbc to testcontainers-jdbc and so on — and the old coordinates are not published at 2.x at all.

That is what consumers hit: their core resolves to 2.x through Spring Boot 4, while env keeps the modules at 1.21.1. ScriptUtils from database-commons:1.21.1 then calls the shaded commons-io that 2.x dropped, and the first container with an init script dies before a single assertion:

NoClassDefFoundError: org/testcontainers/shaded/org/apache/commons/io/IOUtils
    at ScriptUtils.runInitScript

env-selenium used that same shaded commons-io for FileUtils.ONE_GB; it is a plain constant now.

InitScriptTest covers the path: with the modules at 1.21.1 against a 2.x core it fails with exactly that error, and it passes with 2.0.5 across the board.

Breaking for anyone who declares Testcontainers module coordinates themselves — they have to rename too.

Testcontainers 2 renamed every module artifact — postgresql to
testcontainers-postgresql, jdbc to testcontainers-jdbc and so on — and the old
coordinates are not published at 2.x at all. That is what consumers hit: their core
resolves to 2.x through Spring Boot while env keeps modules at 1.21.1, and ScriptUtils
from database-commons 1.21.1 calls the shaded commons-io that 2.x dropped, so the first
container with an init script dies with NoClassDefFoundError before a single assertion.

env-selenium used that same shaded commons-io for FileUtils.ONE_GB; it is a constant now.

InitScriptTest covers the path: with modules at 1.21.1 against a 2.x core it fails with
that exact NoClassDefFoundError, and it passes with 2.0.5 across the board.

Breaking for anyone declaring org.testcontainers module coordinates themselves — they
have to rename too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@MetallFoX
MetallFoX merged commit 1bd6845 into main Aug 12, 2026
1 check passed
This was referenced Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant