Revert "IJPL-845 Make opening performance tests wait till full highlight"

This reverts commit a267a8eb10b303075737865e9a9e4bc459e963ae.

GitOrigin-RevId: c6538d85b96f45c5b526fa575c943e4a07411e40
This commit is contained in:
Elena Shaverdova
2024-03-25 21:54:07 +00:00
committed by intellij-monorepo-bot
parent 59d047773b
commit 85a52308c1
@@ -19,12 +19,9 @@ import com.intellij.openapi.project.DumbService
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.playback.PlaybackContext
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.platform.ide.diagnostic.startUpPerformanceReporter.FUSProjectHotStartUpMeasurerService
import com.intellij.util.concurrency.annotations.RequiresReadLock
import com.intellij.util.ui.UIUtil
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import java.time.Duration
import java.util.concurrent.ConcurrentHashMap
@@ -37,20 +34,6 @@ class WaitForFinishedCodeAnalysis(text: String, line: Int) : PerformanceCommandC
}
override suspend fun doExecute(context: PlaybackContext) {
val checkingJob = coroutineScope {
launch {
while (true) {
@Suppress("TestOnlyProblems")
if (!service<FUSProjectHotStartUpMeasurerService>().isHandlingFinished()) {
delay(500)
}
else {
return@launch
}
}
}
}
checkingJob.join()
context.project.service<ListenerState>().waitAnalysisToFinish()
}