cleanup, print motivating message on success

This commit is contained in:
Alexey Kudravtsev
2017-03-27 13:39:35 +03:00
parent e5e144f124
commit fba634395c
@@ -270,8 +270,8 @@ public class PlatformTestUtil {
UIUtil.dispatchAllInvocationEvents();
long start = System.currentTimeMillis();
boolean sleptAlready = false;
try {
boolean sleptAlready = false;
while (!alarmInvoked2.get()) {
AtomicBoolean laterInvoked = new AtomicBoolean();
ApplicationManager.getApplication().invokeLater(() -> laterInvoked.set(true));
@@ -617,6 +617,9 @@ public class PlatformTestUtil {
int percentage = (int)(100.0 * (duration - expectedOnMyMachine) / expectedOnMyMachine);
logMessage += ": " + "\u001B[31;1m " + percentage + "% longer" + "\u001B[0m";
}
else {
logMessage += " NOT!";
}
logMessage +=
"\n Expected: " + formatTime(expectedOnMyMachine) +
"\n Actual: " + formatTime(duration) +