From ede2f25fd91671abf829d33745ceab3ced96a142 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Mon, 23 Nov 2015 11:34:05 +0100 Subject: [PATCH] [tests] timeouts in output reader test corrected; cleanup --- .../intellij/util/io/BaseOutputReaderTest.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/platform/util/testSrc/com/intellij/util/io/BaseOutputReaderTest.java b/platform/util/testSrc/com/intellij/util/io/BaseOutputReaderTest.java index c18ecde779b3..6e855a128589 100644 --- a/platform/util/testSrc/com/intellij/util/io/BaseOutputReaderTest.java +++ b/platform/util/testSrc/com/intellij/util/io/BaseOutputReaderTest.java @@ -41,7 +41,7 @@ import static org.junit.Assert.assertNotNull; public class BaseOutputReaderTest { private static final String[] TEST_DATA = {"first\n", "incomplete", "-continuation\n", "last\n"}; - private static final int TIMEOUT = 100; + private static final int TIMEOUT = 500; private static ThreadPoolExecutor ourExecutor; @@ -50,7 +50,7 @@ public class BaseOutputReaderTest { public TestOutputReader(InputStream stream, SleepingPolicy sleepingPolicy) { super(stream, null, sleepingPolicy); - start(); + start(BaseOutputReaderTest.class.getSimpleName()); } @Override @@ -71,14 +71,9 @@ public class BaseOutputReaderTest { } @AfterClass - public static void tearDown() { + public static void tearDown() throws InterruptedException { ourExecutor.shutdown(); - try { - ourExecutor.awaitTermination(1000, TimeUnit.SECONDS); - } - catch (InterruptedException e) { - throw new RuntimeException(e); - } + ourExecutor.awaitTermination(120, TimeUnit.SECONDS); ourExecutor = null; } @@ -118,4 +113,4 @@ public class BaseOutputReaderTest { Thread.sleep(TIMEOUT); } } -} +} \ No newline at end of file