Fix tests freeze because of ScriptChangesNotifier (KT-37112)

#KT-37112 Fixed
This commit is contained in:
Sergey Rostov
2020-02-28 14:54:23 +03:00
committed by Nikolay Krasko
parent 03913ff029
commit 7359bb8a00
@@ -45,8 +45,12 @@ internal class ScriptChangesNotifier(
} }
private fun runScriptDependenciesUpdateIfNeeded(file: VirtualFile) { private fun runScriptDependenciesUpdateIfNeeded(file: VirtualFile) {
AppExecutorUtil.getAppExecutorService().submit { if (ApplicationManager.getApplication().isUnitTestMode) {
getListener(project, file)?.editorActivated(file, updater) getListener(project, file)?.editorActivated(file, updater)
} else {
AppExecutorUtil.getAppExecutorService().submit {
getListener(project, file)?.editorActivated(file, updater)
}
} }
} }
}, },