diff --git a/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/WaitForFinishedCodeAnalysis.kt b/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/WaitForFinishedCodeAnalysis.kt index 2aaff5ebb10f..4708004d0667 100644 --- a/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/WaitForFinishedCodeAnalysis.kt +++ b/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/WaitForFinishedCodeAnalysis.kt @@ -139,7 +139,7 @@ class CodeAnalysisStateListener(val project: Project, val cs: CoroutineScope) { launch { while (true) { @Suppress("TestOnlyProblems") - if (!service().isHandlingFinished() && !future.isDone) { + if (!ApplicationManagerEx.getApplication().isHeadlessEnvironment && !service().isHandlingFinished() && !future.isDone) { delay(500) } else {