testcontainers / testcontainers/testcontainers-java
Log the exception before swallowing it
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
Here the exception is swallowed without any logs. That makes debugging confusing. In my case, the test failed with the error "Docker must be present blah blah", but the actual issue was disk space problem.
Another solution could be to change the level of log in DockerClientFactory#checkDiskSpace to warning.
Let me know if you need the PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in core/src/main/java/org/testcontainers/DockerClientFactory.java at the linked code around line 133, then inspect DockerClientFactory#checkDiskSpace and nearby logging conventions. Confirm how the exception is swallowed and what log level is currently used. Done means the disk-space failure is visible in logs instead of producing only the misleading Docker-present message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- infrastructure, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100