mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
setup thread factory even when running a single test
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package com.intellij.testFramework;
|
||||
|
||||
import com.intellij.codeInsight.CodeInsightSettings;
|
||||
import com.intellij.concurrency.IdeaForkJoinWorkerThreadFactory;
|
||||
import com.intellij.diagnostic.PerformanceWatcher;
|
||||
import com.intellij.mock.MockApplication;
|
||||
import com.intellij.openapi.Disposable;
|
||||
@@ -86,6 +87,8 @@ public abstract class UsefulTestCase extends TestCase {
|
||||
private static final Map<String, Long> TOTAL_TEARDOWN_COST_MILLIS = new HashMap<>();
|
||||
|
||||
static {
|
||||
// to setup thread factory even when running a single test
|
||||
IdeaForkJoinWorkerThreadFactory.setupForkJoinCommonPool();
|
||||
Logger.setFactory(TestLoggerFactory.class);
|
||||
}
|
||||
protected static final Logger LOG = Logger.getInstance(UsefulTestCase.class);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.testFramework.fixtures.impl;
|
||||
|
||||
import com.intellij.concurrency.IdeaForkJoinWorkerThreadFactory;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.testFramework.EdtTestUtil;
|
||||
@@ -31,6 +32,11 @@ public class BaseFixture implements IdeaTestFixture {
|
||||
private boolean myDisposed;
|
||||
private final Disposable myTestRootDisposable = Disposer.newDisposable();
|
||||
|
||||
static {
|
||||
// to setup thread factory even when running a single test
|
||||
IdeaForkJoinWorkerThreadFactory.setupForkJoinCommonPool();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
Assert.assertFalse("setUp() already has been called", myInitialized);
|
||||
|
||||
Reference in New Issue
Block a user