testcontainers / testcontainers/testcontainers-java
[Enhancement]: Reduce exceptions caused by Unreliables.retryUntilTrue
Personne n'a encore pris cette issue.
- Langage dominant
- Java
- Étoiles
- 8.7k
- Forks
- 1.9k
- Merge moyen
- 2 j 17 h
- PR mergées (30 j)
- 9
Description
Module
Core
Proposal
Hi 👋
I've been profiling test pipelines in our in-house projects and noticed on several Spring-Boot related projects that use DockerComposeContainer that a large amount of exceptions is thrown when waiting for the containers to start.

Throwing RuntimeExceptions with the message "Not ready yet" is not really exceptional here - on the contrary. It's rather the norm. I can't imagine this to be super efficient. It would be great if an alternative solution could be implemented that isn't based on exceptions. Or short-term alternative: throwing a dedicate exception with fillInStackTrace overridden to at least avoid the overhead of generating the stacktrace.
class NotReadyYetException extends RuntimeException {
public NotReadyYetException() {
super("Not ready yet");
}
@Override
public synchronized Throwable fillInStackTrace() {
return this;
}
}
Or caching the exception....
Because duct-tape seems to be read only, I hope this is the correct place for this report. Please lead me to the correct place if not. I'm also open to provide the short term solution somewhere if you want me to and you think this is worthwhile.
Let me know what you think.
Cheers,
Christoph
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par retracer le point d’entrée Unreliables.retryUntilTrue et son utilisation par DockerComposeContainer lors de l’attente des conteneurs. Comparez le comportement actuel des tentatives basé sur les exceptions avec le chemin proposé sans exception ou avec une exception sans stacktrace, puis définissez et testez une réduction mesurable de la surcharge liée aux exceptions sans modifier le comportement de disponibilité.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- docker, docker-compose, java
- Domaine
- testing
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100