testcontainers / testcontainers/testcontainers-java

Log the exception before swallowing it

Open
#4,859 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

resolution/waiting-for-info
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.