Skip to content

Commit 5fbffbd

Browse files
authored
Clarify reuse property setting in docs (#8872)
1 parent e1520a0 commit 5fbffbd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

core/src/main/java/org/testcontainers/utility/TestcontainersConfiguration.java

-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ public boolean isDisableChecks() {
181181

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

docs/features/reuse.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ opt-in mechanism per environment. To reuse a container, the container configurat
1616

1717
## How to use it
1818

19-
* Enable `Reusable Containers` in `~/.testcontainers.properties`, by adding `testcontainers.reuse.enable=true`
19+
* Enable `Reusable Containers`
20+
* through environment variable `TESTCONTAINERS_REUSE_ENABLE=true`
21+
* through user property file `~/.testcontainers.properties`, by adding `testcontainers.reuse.enable=true`
22+
* **not** through classpath properties file [see this comment](https://github.com/testcontainers/testcontainers-java/issues/5364#issuecomment-1125907734)
23+
2024
* Define a container and subscribe to reuse the container using `withReuse(true)`
2125

2226
```java

0 commit comments

Comments
 (0)