From 73a9685aca387d2fb84cc84684ef6bc0d24b8e47 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 15 Aug 2016 16:53:38 +0300 Subject: [PATCH] initialize ForkJoinCommon pool because some tests do not init application but want to use parallel streams --- platform/testFramework/src/_FirstInSuiteTest.java | 5 +++++ platform/testFramework/testFramework.iml | 1 + 2 files changed, 6 insertions(+) diff --git a/platform/testFramework/src/_FirstInSuiteTest.java b/platform/testFramework/src/_FirstInSuiteTest.java index 875fc9a6be26..671659a77c8b 100644 --- a/platform/testFramework/src/_FirstInSuiteTest.java +++ b/platform/testFramework/src/_FirstInSuiteTest.java @@ -15,6 +15,7 @@ */ import com.intellij.TestAll; +import com.intellij.concurrency.IdeaForkJoinWorkerThreadFactory; import com.intellij.openapi.util.io.FileUtilRt; import com.intellij.testFramework.TestRunnerUtil; import junit.framework.TestCase; @@ -53,6 +54,10 @@ public class _FirstInSuiteTest extends TestCase { if (nothingIsCalled) return; nothingIsCalled = true; + + // some tests do not initialize Application but want to use parallel streams + IdeaForkJoinWorkerThreadFactory.setupForkJoinCommonPool(); + suiteStarted = System.nanoTime(); SwingUtilities.invokeAndWait(() -> System.out.println("EDT is " + Thread.currentThread())); diff --git a/platform/testFramework/testFramework.iml b/platform/testFramework/testFramework.iml index 5535f3787bfc..a3d3621de9e7 100644 --- a/platform/testFramework/testFramework.iml +++ b/platform/testFramework/testFramework.iml @@ -27,5 +27,6 @@ + \ No newline at end of file