--- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/QueueExecutor.java 2016-12-29 15:41:11.062249436 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/QueueExecutor.java 2016-12-29 15:41:11.010248885 +0300 @@ -222,7 +222,7 @@ } public boolean failed() { - return action.failed(); + return !done || action.failed(); } public Throwable getThrowable() { @@ -231,8 +231,9 @@ public synchronized void waitDone(Timeout timeout) { try { - while (!done) { - wait(timeout.getValue()); + long maxTime = System.currentTimeMillis() + timeout.getValue(); + while (!done && System.currentTimeMillis() < maxTime) { + wait(maxTime - System.currentTimeMillis()); } } catch (InterruptedException ex) { }