You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2023/04/10 03:14:21 UTC
[james-project] branch master updated: JAMES-3775 DockerClamAV - update waiting strategy
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new e13a97200b JAMES-3775 DockerClamAV - update waiting strategy
e13a97200b is described below
commit e13a97200b835059959c1c5a6faf0ce909ab6dac
Author: Tung Van TRAN <vt...@linagora.com>
AuthorDate: Fri Apr 7 09:26:25 2023 +0700
JAMES-3775 DockerClamAV - update waiting strategy
---
.../clamav/src/test/java/org/apache/james/clamav/DockerClamAV.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/third-party/clamav/src/test/java/org/apache/james/clamav/DockerClamAV.java b/third-party/clamav/src/test/java/org/apache/james/clamav/DockerClamAV.java
index 4db1eb9782..c66d278388 100644
--- a/third-party/clamav/src/test/java/org/apache/james/clamav/DockerClamAV.java
+++ b/third-party/clamav/src/test/java/org/apache/james/clamav/DockerClamAV.java
@@ -22,6 +22,7 @@ package org.apache.james.clamav;
import java.time.Duration;
import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy;
import org.testcontainers.utility.DockerImageName;
public class DockerClamAV {
@@ -36,7 +37,8 @@ public class DockerClamAV {
.withExposedPorts(DEFAULT_PORT)
.withEnv("CLAMAV_NO_FRESHCLAMD", "true")
.withEnv("CLAMAV_NO_MILTERD", "true")
- .withStartupTimeout(Duration.ofMinutes(2));
+ .waitingFor(new LogMessageWaitStrategy().withRegEx(".*clamd started.*\\n").withTimes(1)
+ .withStartupTimeout(Duration.ofMinutes(5)));
}
public Integer getPort() {
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org