Skip to content

Commit

Permalink
Add more clear warning message instructing users how to enable reusab…
Browse files Browse the repository at this point in the history
…le containers (testcontainers#2422)

* Add more clear warning message instructing users how to enable reusable containers

* Update GenericContainer.java

Co-authored-by: Sergei Egorov <bsideup@gmail.com>
  • Loading branch information
2 people authored and quincy committed May 28, 2020
1 parent 3a01c36 commit 4600cdd
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -69,6 +69,7 @@
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
Expand Down Expand Up @@ -376,7 +377,12 @@ private void tryStart(Instant startedAt) {
}
reusable = true;
} else {
logger().info("Reuse was requested but the environment does not support the reuse of containers");
logger().warn(
"" +
"Reuse was requested but the environment does not support the reuse of containers\n" +
"To enable reuse of containers, you must set 'testcontainers.reuse.enable=true' in a file located at {}",
Paths.get(System.getProperty("user.home"), ".testcontainers.properties")
);
reusable = false;
}
} else {
Expand Down

0 comments on commit 4600cdd

Please sign in to comment.