assertj / assertj/assertj-swing
Assertj-Swing: GuiActionRunner - numRetries/waitBetweenRetries
- Dominant language
- Java
- Stars
- 121
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
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);
}
Contributor guide
Assessment
This issue has not been assessed yet.