--- old/tools/Jemmy/JemmyFX/src/org/jemmy/fx/QueueExecutor.java 2017-02-10 15:02:00.949449647 +0300 +++ new/tools/Jemmy/JemmyFX/src/org/jemmy/fx/QueueExecutor.java 2017-02-10 15:02:00.897449056 +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) { }