From 3582fa2c1b674b3d10b6ef6016f0bb8e8e02076d Mon Sep 17 00:00:00 2001 From: "Andrei.Kuznetsov" Date: Fri, 22 Mar 2024 15:06:29 +0100 Subject: [PATCH] IJPL-578 enable indexing in the background in tests and headless environments GitOrigin-RevId: 05618428565c967b107c82cc5250f83a809d82cd --- .../src/com/intellij/openapi/project/DumbServiceImpl.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/project/DumbServiceImpl.kt b/platform/platform-impl/src/com/intellij/openapi/project/DumbServiceImpl.kt index 9b1f2c0ef774..527988699275 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/DumbServiceImpl.kt +++ b/platform/platform-impl/src/com/intellij/openapi/project/DumbServiceImpl.kt @@ -722,9 +722,12 @@ open class DumbServiceImpl @NonInjectable @VisibleForTesting constructor(private } } + // TODO IJPL-578 - behavior should be the same in tests and prod. Temporary flag to ease tests migration. + private val IS_UNDER_TEAMCITY: Boolean = System.getenv("TEAMCITY_VERSION") != null + val useSynchronousTaskQueue: Boolean @VisibleForTesting - get() = isSynchronousTaskExecution + get() = SystemProperties.getBooleanProperty("unittest.synchronous.dumb.queue", IS_UNDER_TEAMCITY && isSynchronousTaskExecution) @JvmStatic val isSynchronousTaskExecution: Boolean