Skip to content

[Enhancement]: JUnit CloseableResource deprecated #10525

@norrisjeremy

Description

@norrisjeremy

Module

Core

Proposal

JUnit 5.13 has deprecated the CloseableResource interface and now recommends users to instead implement the AutoCloseable interface.
See https://docs.junit.org/5.13.3/user-guide/index.html#extensions-keeping-state-autocloseable-migration.

As it stands, right now JUnit 5.13+ now spews the following warning to the console when executing tests which use the TestContainers JUnit extension, so remedying this with their suggested change would be appreciated:

WARNING: Type implements CloseableResource but not AutoCloseable: org.testcontainers.junit.jupiter.TestcontainersExtension$StoreAdapter

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions