Skip to content

Update dependency org.testcontainers:testcontainers-bom to v2 - #523

Open
renovate[bot] wants to merge 1 commit into
developfrom
renovate/major-testcontainers-java-monorepo
Open

Update dependency org.testcontainers:testcontainers-bom to v2#523
renovate[bot] wants to merge 1 commit into
developfrom
renovate/major-testcontainers-java-monorepo

Conversation

@renovate

@renovate renovate Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
org.testcontainers:testcontainers-bom (source) 1.21.42.0.5 age confidence

Release Notes

testcontainers/testcontainers-java (org.testcontainers:testcontainers-bom)

v2.0.5

Compare Source

What's Changed

🚀 Features & Enhancements

🐛 Bug Fixes

📖 Documentation

🧹 Housekeeping

📦 Dependency updates

16 changes

v2.0.4

Compare Source

What's Changed

📖 Documentation

📦 Dependency updates

v2.0.3

Compare Source

What's Changed
🐛 Bug Fixes
📖 Documentation
📦 Dependency updates
7 changes

v2.0.2

Compare Source

What's Changed
🐛 Bug Fixes
📖 Documentation
🧹 Housekeeping
📦 Dependency updates

v2.0.1

Compare Source

What's Changed
🐛 Bug Fixes
  • Add MySQLR2DBCDatabaseContainer compatible with org.testcontainers.mysql.MySQLContainer (#​11119) @​eddumelendez
  • Add MariaDBR2DBCDatabaseContainer compatible with org.testcontainers.mariadb.MariaDBContainer (#​11117) @​eddumelendez
  • Add MSSQLR2DBCDatabaseContainer compatible with org.testcontainers.mssqlserver.MSSQLServerContainer (#​11118) @​eddumelendez
  • Add PostgreSQLR2DBCDatabaseContainer compatible with org.testcontainers.postgresql.PostgreSQLContainer (#​11120) @​eddumelendez
📖 Documentation
🧹 Housekeeping

v2.0.0

Compare Source

Testcontainers 2.0.0

Main changes

  • Removed JUnit 4 support
  • Updated transitive dependencies
  • All modules are now prefixed with testcontainers-. For example, org.testcontainers:mysql is now org.testcontainers:testcontainers-mysql
  • Container classes relocated to org.testcontainers.<module-name> package. For example, new MySQLContainer class is under org.testcontainers.mysql
What's Changed
⚠️ Breaking API changes
🚀 Features & Enhancements
🐛 Bug Fixes
📖 Documentation
🧹 Housekeeping
📦 Dependency updates
46 changes

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@codacy-production

codacy-production Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@renovate
renovate Bot force-pushed the renovate/major-testcontainers-java-monorepo branch 2 times, most recently from 499965d to 6cb85a9 Compare May 31, 2026 07:38
@renovate renovate Bot changed the title Update dependency org.testcontainers:testcontainers-bom to v2 Update testcontainers-java monorepo to v2 Jun 2, 2026
@renovate
renovate Bot force-pushed the renovate/major-testcontainers-java-monorepo branch from 6cb85a9 to 1052065 Compare June 5, 2026 02:22
@renovate renovate Bot changed the title Update testcontainers-java monorepo to v2 Update testcontainers-java monorepo (major) Jun 22, 2026
@renovate renovate Bot changed the title Update testcontainers-java monorepo (major) Update dependency org.testcontainers:testcontainers-bom to v2 Jun 25, 2026

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The upgrade of org.testcontainers:testcontainers-bom to version 2.0.5 introduces significant breaking changes that have not been fully addressed in this PR.

Key issues found:

  • Artifact Renaming: Testcontainers 2.x requires all module artifact IDs to be prefixed with testcontainers- (e.g., mysql becomes testcontainers-mysql).
  • Package Relocations: Classes have been moved, which will cause compilation failures in existing code.
  • JUnit 4 Support: Support for JUnit 4 has been removed. If the project uses Testcontainers' JUnit 4 rules, those tests will fail.

While the version update itself is correct according to the requirement, the lack of corresponding configuration and code changes makes this PR unsafe to merge in its current state.

About this PR

  • Testcontainers v2.0 introduces a mandatory 'testcontainers-' prefix for all module artifacts. The project's library definitions must be updated to match these new identifiers to avoid resolution failures.
  • JUnit 4 support is removed in Testcontainers v2. Verify if the project relies on Testcontainers JUnit 4 rules and migrate them to JUnit 5 or use the provided migration path if available.

Test suggestions

  • Verify that the build successfully resolves dependencies with the new major version
  • Verify that existing container-based tests still pass despite the breaking changes (package relocation and JUnit 4 removal) in Testcontainers v2
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that the build successfully resolves dependencies with the new major version
2. Verify that existing container-based tests still pass despite the breaking changes (package relocation and JUnit 4 removal) in Testcontainers v2

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread gradle/libs.versions.toml
embedded_postgres = "2.2.2"
embedded_postgres_binaries = "18.4.0"
testcontainers = "1.21.4"
testcontainers = "2.0.5"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 HIGH RISK

Updating to v2 requires artifact ID changes and package relocation. Ensure that the 'libraries' section of this catalog and project imports are updated to match Testcontainers 2.0 specifications.

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.

0 participants