testcontainers / testcontainers/testcontainers-java
`FAIL_FAST_ALWAYS` for selection of `DockerClientProviderStrategy` not reset in flaky environments when tests are retried
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 8.7k
- Fork
- 1.9k
- Merge medio
- 2g 17h
- PR unite (30g)
- 9
Descrizione
Hello team!
Please provide ability to disable FAIL_FAST_ALWAYS usage for the selection of DockerClientProviderStrategy located here: https://github.com/testcontainers/testcontainers-java/blob/abf18468c2b3c8ec395f07fe91cd3afd449e28d2/core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java#L55
Our use case:
- We have big mono repo which periodically execute "test all" kind of job
- This job running gradle tests in parallel (via gradle settings) and a lot of projects using test containers to perform various tests
- Possibly due to the high usage of docker (this part hard to investigate well for me) sometimes test containers will not be able to find docker environment even though it's present and will set flag FAIL_FAST_ALWAYS
- As we use following plugin https://github.com/gradle/test-retry-gradle-plugin that retry tests as part of the same task I assume that initialized static field is not reset when it retry failed tests. So this plugin trying to retry test from the same task for test that uses test containers and it will fail due to FAIL_FAST_ALWAYS flag be set
Having ability to disable this flag on demand or being able to forcibly configure retries even if that flag is set would be helpful in our situation
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 da core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java, intorno alla riga 55, e segui come FAIL_FAST_ALWAYS viene impostato e verificato durante la selezione dell’ambiente Docker. Riproduci lo scenario di retry con il Gradle test-retry-gradle-plugin; il lavoro è completato quando i chiamanti possono disabilitare il flag o forzare i retry senza compromettere il normale comportamento di fail-fast.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, java
- Ambito
- devops, testing-qa
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100