From dc534239611ebbd32d098b0fa6965c844b224779 Mon Sep 17 00:00:00 2001 From: Sergey Simonchik Date: Wed, 25 Nov 2015 22:51:55 +0300 Subject: [PATCH] console: test simplified --- .../intellij/execution/impl/ConsoleViewImplTest.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/platform/platform-tests/testSrc/com/intellij/execution/impl/ConsoleViewImplTest.java b/platform/platform-tests/testSrc/com/intellij/execution/impl/ConsoleViewImplTest.java index e2a7de97bc19..b7037137548b 100644 --- a/platform/platform-tests/testSrc/com/intellij/execution/impl/ConsoleViewImplTest.java +++ b/platform/platform-tests/testSrc/com/intellij/execution/impl/ConsoleViewImplTest.java @@ -69,16 +69,10 @@ public class ConsoleViewImplTest extends LightPlatformTestCase { public void testDoubleClear() throws Exception { ConsoleViewImpl console = myConsole; Alarm alarm = new Alarm(Alarm.ThreadToUse.SHARED_THREAD); - CountDownLatch latch = new CountDownLatch(3); + CountDownLatch latch = new CountDownLatch(1); alarm.addRequest(() -> { console.clear(); - latch.countDown(); - }, 0); - alarm.addRequest(() -> { console.clear(); - latch.countDown(); - }, 0); - alarm.addRequest(() -> { console.print("Test", ConsoleViewContentType.NORMAL_OUTPUT); latch.countDown(); }, 0); @@ -94,7 +88,7 @@ public class ConsoleViewImplTest extends LightPlatformTestCase { ConsoleViewImpl console = myConsole; console.clear(); EditorActionManager actionManager = EditorActionManager.getInstance(); - final DataContext dataContext = DataManager.getInstance().getDataContext(); + DataContext dataContext = DataManager.getInstance().getDataContext(console.getComponent()); TypedAction action = actionManager.getTypedAction(); action.actionPerformed(console.getEditor(), 'h', dataContext); assertEquals(1, console.getContentSize()); -- 2.23.3