Skip to content

Commit 2cb1429

Browse files
authored
#621 increase Ryuk's timeout and make it configurable (#635)
* #621 increase Ryuk's timeout and make it configurable * Add to CHANGELOG.md
1 parent be3d206 commit 2cb1429

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
66
### Fixed
77
- Fixed extraneous insertion of `useSSL=false` in all JDBC URL strings, even for DBs that do not understand it. Usage is now restricted to MySQL by default and can be overridden by authors of `JdbcDatabaseContainer` subclasses ([\#568](https://github.com/testcontainers/testcontainers-java/issues/568))
88
- Fixed `getServicePort` on `DockerComposeContainer` throws NullPointerException if service instance number in not used. ([\#619](https://github.com/testcontainers/testcontainers-java/issues/619))
9+
- Increase Ryuk's timeout and make it configurable with `ryuk.container.timeout`. ([\#621](https://github.com/testcontainers/testcontainers-java/issues/621)[\#635](https://github.com/testcontainers/testcontainers-java/issues/635))
910

1011
### Changed
1112
- Added compatibility with selenium greater than 3.X ([\#611](https://github.com/testcontainers/testcontainers-java/issues/611))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public static String start(String hostIpAddress, DockerClient client, boolean wi
161161
kiraThread.start();
162162

163163
// We need to wait before we can start any containers to make sure that we delete them
164-
if (!ryukScheduledLatch.await(5, TimeUnit.SECONDS)) {
164+
if (!ryukScheduledLatch.await(TestcontainersConfiguration.getInstance().getRyukTimeout(), TimeUnit.SECONDS)) {
165165
throw new IllegalStateException("Can not connect to Ryuk");
166166
}
167167

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ public String getRyukImage() {
5050
return (String) properties.getOrDefault("ryuk.container.image", "bsideup/moby-ryuk:0.2.2");
5151
}
5252

53+
public Integer getRyukTimeout() {
54+
return (Integer) properties.getOrDefault("ryuk.container.timeout", 30);
55+
}
56+
5357
public String getKafkaImage() {
5458
return (String) properties.getOrDefault("kafka.container.image", "confluentinc/cp-kafka");
5559
}

0 commit comments

Comments
 (0)