Replies: 1 comment 1 reply
-
Can you please edit your original post to include the logs as an example? I think I know what you are getting at, for inexperienced users, especially on CI, the exceptions and logs can be misleading with regards to what kind of strategies where tried out. I am sure we can improve there 👍 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I've been spending time troubleshooting a Docker connection error we experience in Gitlab CI. Tracking it down is proving hard and there is a Testcontainers behavior that took me a while to discover.
The starting point is the IllegalStateException thrown at DockerClientProviderStrategy at line 256 (Testcontainers 1.17.6).
The thing is that the message of the exception only says "Could not find a valid Docker environment. Please see logs and check configuration". In my understanding, check the logs translates to, check the log message thrown previous to the exception. Which after checking source code should be the error logged at line 248. However, I noticed that Testcontainers is caching all exceptions thrown (see DockerClientFactory line 177) so that it fails fast by just rethrowing the previous exceptions. The consequence is that the meaningful message is only output once at the first occurrence so I have to search it in the whole output (which may be big when using Spring). This is the message I refer to as meaningful:
Suggestion: considering that most applications have several tests relying on Testcontainers I think it would be more useful to integrate the meaningful message into the exception message, not only in the log output. This way I would just need to find any occurrence of the exception to read the meaningful message.
Beta Was this translation helpful? Give feedback.
All reactions