testcontainers / testcontainers/testcontainers-java
[Enhancement]: Throw specific exception type if no Docker env found
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 8.7k
- Fork
- 1.9k
- Merge medio
- 2g 17h
- PR unite (30g)
- 9
Descrizione
Module
Core
Proposal
Currently, if DockerClientProviderStrategy cannot find a Docker environment on the host, it throws an IllegalStateException. I suggest that this should be a dedicated exception type (extending RuntimeException), so that it can be unambiguously caught and handled.
My use case is to catch that exception and rethrow an org.junit.AssumptionViolatedException if the test is running on an unsupported host. I can catch the IllegalStateException as it stands, but there may other causes of that type, so it's a little ambiguous.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con DockerClientProviderStrategy, in particolare con il percorso seguito quando non viene trovato alcun ambiente Docker. Traccia il comportamento esistente delle eccezioni e i test del repository, quindi verifica che questa condizione disponga di un tipo RuntimeException dedicato che i chiamanti possano intercettare in modo non ambiguo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, java
- Ambito
- devops, testing
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100