mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
set stress flag as early as possible before e.g. VirtualFileManagerImpl init which checks the flag to add all sorts of slow debug logging
This commit is contained in:
@@ -16,9 +16,12 @@
|
||||
package com.intellij.testFramework.fixtures;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.impl.ApplicationInfoImpl;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.SkipInHeadlessEnvironment;
|
||||
import com.intellij.testFramework.SkipSlowTestLocally;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -36,6 +39,8 @@ public abstract class BareTestFixtureTestCase {
|
||||
|
||||
@Before
|
||||
public final void setupFixture() throws Exception {
|
||||
ApplicationInfoImpl.setInStressTest(UsefulTestCase.isPerformanceTest(null, getClass().getName()));
|
||||
|
||||
boolean headless = SKIP_HEADLESS && getClass().getAnnotation(SkipInHeadlessEnvironment.class) != null;
|
||||
assumeFalse("Class '" + getClass().getName() + "' is skipped because it requires working UI environment", headless);
|
||||
boolean slow = SKIP_SLOW && getClass().getAnnotation(SkipSlowTestLocally.class) != null;
|
||||
@@ -43,6 +48,7 @@ public abstract class BareTestFixtureTestCase {
|
||||
|
||||
myFixture = IdeaTestFixtureFactory.getFixtureFactory().createBareFixture();
|
||||
myFixture.setUp();
|
||||
Disposer.register(getTestRootDisposable(), ()-> ApplicationInfoImpl.setInStressTest(false));
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
Reference in New Issue
Block a user