Open mpapirkovskyy opened 6 years ago
Do you mean this log?
log.warn("Can not connect to Ryuk at {}:{}", hostIpAddress, ryukPort, e);
@kiview yes.
I'd like to create a PR for this, so... What delay would be acceptable? :)
That sounds good - thanks @mfolnovic.
How about a 1 second interval? Maybe this would still be quite a lot of logs in the case of massive failure, but ... it's a lot less than it currently would be!
1 second is too much (usually takes less than 100ms), we should not make the tests slower because of logging.
Maybe we should rate limit the logging only?
Rate limiting logging sounds like a better idea to me, nice! :smiley:
Logging once per second or more frequent?
EDIT: definitely needed :smile:
Job's log exceeded limit of 4194304 bytes.
To add to this, I also think we should limit waiting to not end up in infinite loop.
To give you a bit of context why this is important to me. Every time this goes to infinite loop (in CI), I have to cancel CI job. Then, because of this Gitlab CI bug, containers and networks don't clean up.
Ideally, this loop should wait for some amount of seconds before stopping trying and gracefully fail the test.
What do you think? :)
EDIT: ignore this comment, missed the part that's doing this:
if (!ryukScheduledLatch.await(TestcontainersConfiguration.getInstance().getRyukTimeout(), TimeUnit.SECONDS)) {
throw new IllegalStateException("Can not connect to Ryuk");
}
https://github.com/testcontainers/testcontainers-java/blob/609f9a10c3c110be405b9cd96fc340c992b79b3b/core/src/main/java/org/testcontainers/utility/ResourceReaper.java#L117
This loop seem to produce too much logs when container start is delayed for some reason.