Skip to content

Commit

Permalink
Clarify reuse property setting in docs (#8872)
Browse files Browse the repository at this point in the history
  • Loading branch information
MV-GH authored Jul 11, 2024
1 parent e1520a0 commit 5fbffbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ public boolean isDisableChecks() {

@UnstableAPI
public boolean environmentSupportsReuse() {
// specifically not supported as an environment variable or classpath property
return Boolean.parseBoolean(getEnvVarOrUserProperty("testcontainers.reuse.enable", "false"));
}

Expand Down
6 changes: 5 additions & 1 deletion docs/features/reuse.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ opt-in mechanism per environment. To reuse a container, the container configurat

## How to use it

* Enable `Reusable Containers` in `~/.testcontainers.properties`, by adding `testcontainers.reuse.enable=true`
* Enable `Reusable Containers`
* through environment variable `TESTCONTAINERS_REUSE_ENABLE=true`
* through user property file `~/.testcontainers.properties`, by adding `testcontainers.reuse.enable=true`
* **not** through classpath properties file [see this comment](https://github.com/testcontainers/testcontainers-java/issues/5364#issuecomment-1125907734)

* Define a container and subscribe to reuse the container using `withReuse(true)`

```java
Expand Down

0 comments on commit 5fbffbd

Please sign in to comment.