From 791708bf5147880cec6da71c5701337bece5a706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Z=C3=B6ller?= Date: Mon, 21 Mar 2022 19:24:33 +0100 Subject: [PATCH] Minor changes, release preparations --- README.md | 2 ++ src/clj_test_containers/core.clj | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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)))