assertj / assertj/assertj-swing

Assertj-Swing: GuiActionRunner - numRetries/waitBetweenRetries

Aperta
#204 10 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@andyhayder ci sta già lavorando.

Dal 16/5/2017.

Lingua principale
Java
Stelle
121
Fork
52
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi,
unfortunately i miss following feature. I have the problem that some actions creating a new GUI form/element runs a lot of time (SwingWorker, DynamicTreeNode(s)). So i implemented following workaround, which works fine.

Example
public static void execute(@Nonnull GuiTask task) {
if (!executeInEDT) {
executeInCurrentThread(task);
return;
}
for (int i = 0; i < # ConfigAssertJ.numRetries - 1; i++) {
run(task);
if (task.catchedException() == null) {
break;
}
// Error -> retry
System.out.println("Retry " + task);
try {
Thread.sleep(ConfigAssertJ.waitBetweenRetries);
} catch (Exception e) {
// TODO: handle exception
}
}
rethrowCaughtExceptionIn(task);
}

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.