diff --git a/README.md b/README.md index cb6eaee..2ad1545 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ This library is a lightweight wrapper around the [Testcontainers Java library](h ## What it isn't This library does not provide tools to include testcontainers in your testing lifecycle. As there are many different test tools with different approaches to testing in the clojure world, handling the lifecycle is up to you. +## Integration with test runners +There is an [experimental kaocha plugin](https://github.com/lambdaschmiede/kaocha-testcontainers-plugin) you can try out ## Usage diff --git a/src/clj_test_containers/core.clj b/src/clj_test_containers/core.clj index a32c3c0..0824a54 100644 --- a/src/clj_test_containers/core.clj +++ b/src/clj_test_containers/core.clj @@ -133,10 +133,13 @@ {:wait-for-healthcheck true}) (defmethod wait :log - [{:keys [message startup-timeout]} ^GenericContainer container] + [{:keys [message times startup-timeout]} ^GenericContainer container] (let [log-message (str ".*" message ".*\\n") strategy (Wait/forLogMessage log-message 1)] + (when times + (.withTimes strategy times)) + (when startup-timeout (.withStartupTimeout strategy (Duration/ofSeconds startup-timeout)))