diff --git a/platform/remoteDev-util/src/com/intellij/remoteDev/tests/impl/DistributedTestHost.kt b/platform/remoteDev-util/src/com/intellij/remoteDev/tests/impl/DistributedTestHost.kt index daeb6322ab4b..fadac01bb01f 100644 --- a/platform/remoteDev-util/src/com/intellij/remoteDev/tests/impl/DistributedTestHost.kt +++ b/platform/remoteDev-util/src/com/intellij/remoteDev/tests/impl/DistributedTestHost.kt @@ -5,6 +5,7 @@ import com.intellij.codeWithMe.ClientId.Companion.isLocal import com.intellij.codeWithMe.asContextElement import com.intellij.codeWithMe.clientId import com.intellij.diagnostic.LoadingState +import com.intellij.diagnostic.dumpCoroutines import com.intellij.diagnostic.enableCoroutineDump import com.intellij.diagnostic.logs.DebugLogLevel import com.intellij.diagnostic.logs.LogCategory @@ -108,9 +109,14 @@ open class DistributedTestHost(coroutineScope: CoroutineScope) { if (port != null) { LOG.info("Queue creating protocol on $hostAddress:$port") coroutineScope.launch { + val coroutineDumperOnTimeout = launch { + delay(20.seconds) + LOG.warn("LoadingState.COMPONENTS_LOADED has not occurred in 20 seconds: ${dumpCoroutines()}") + } while (!LoadingState.COMPONENTS_LOADED.isOccurred) { delay(10.milliseconds) } + coroutineDumperOnTimeout.cancel() withContext(Dispatchers.EDT + ModalityState.any().asContextElement()) { createProtocol(hostAddress, port) }