testcontainers / testcontainers/testcontainers-java

`FAIL_FAST_ALWAYS` for selection of `DockerClientProviderStrategy` not reset in flaky environments when tests are retried

Abierto
#5,017 9 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

resolution/acknowledged type/bug
Lenguaje dominante
Java
Estrellas
8.7k
Forks
1.9k
Merge medio
2 d 17 h
PR fusionados (30 d)
9

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza en core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java, alrededor de la línea 55, y sigue cómo se establece y comprueba FAIL_FAST_ALWAYS durante la selección del entorno de Docker. Reproduce el escenario de reintento con el Gradle test-retry-gradle-plugin; se considera terminado cuando los llamadores pueden desactivar el flag o forzar reintentos sin romper el comportamiento normal de fail-fast.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
docker, java
Área
devops, testing-qa
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.