-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `withReuse(true)` and `testcontainers.reuse.enable=true` don't work together with `@Container`. The JUnit extension gathers those containers and stop them in the end of test class unconditionally. * Remove `@Container` annotation usage * Use `@BeforeAll` and `GenericContainer.start()` manually This way the container ensures to reuse existing running container and don't start a fresh one. Since the container instance is stored in a `static` property, it is really started only once. The rest tests in a suite just reuse that existing container. Ryuk container will take care about their stopping and removal eventually afte JVM exit. **Cherry-pick to `5.5.x`**
- Loading branch information
1 parent
e645d04
commit 7262c5f
Showing
2 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters