assertj / assertj/assertj-swing
Thread synchro
- Lingua principale
- Java
- Stelle
- 121
- Fork
- 52
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hello!
the question is little stupid, but unfortunality I don't have any experiences in threads.
I'm testing a complex program and call the main-class with:
```
Thread thread = new Thread() {
public void run() {
ApplicationLauncher withArgs = application(Main.class).withArgs("option1=on");
withArgs.start();
}
};
thread.start();
```
When I don't to this in an extra thread the next inputs via robot() won't get executed.
However, I inserted multipled Thread.sleep()-methods, because the program takes a while to start, and without them the input are too early.
All in all I'm unsure if I do aything extremly wrong here - could anyone give me a hint?
Would be very nice!
Thanks
Hans
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by reviewing the Thread that launches ApplicationLauncher and the subsequent robot() calls, focusing on how startup completion is detected. The issue mentions Thread.sleep() as the current timing workaround; done should be a reliable synchronization approach that prevents inputs from running before the application is ready.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- desktop, testing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100