From 069bfab2c5339c23c8201d3ea67be82d3bb550fe Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 2 Aug 2012 17:23:32 +0200 Subject: [PATCH] Fix compilation --- .../src/com/intellij/testFramework/PlatformTestUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java b/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java index af02205b324d..3a6c9d5b912c 100644 --- a/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java +++ b/platform/testFramework/src/com/intellij/testFramework/PlatformTestUtil.java @@ -208,7 +208,7 @@ public class PlatformTestUtil { } @TestOnly - public static void waitForAlarm(final int delay) { + public static void waitForAlarm(final int delay) throws InterruptedException { assert !ApplicationManager.getApplication().isWriteAccessAllowed(): "It's a bad idea to wait for an alarm under the write action. Somebody creates an alarm which requires read action and you are deadlocked."; assert ApplicationManager.getApplication().isDispatchThread(); @@ -236,7 +236,8 @@ public class PlatformTestUtil { boolean sleptAlready = false; while (!invoked.get()) { UIUtil.dispatchAllInvocationEvents(); - TimeoutUtil.sleep(sleptAlready ? 10 : delay); + //noinspection BusyWait + Thread.sleep(sleptAlready ? 10 : delay); sleptAlready = true; } UIUtil.dispatchAllInvocationEvents();