Fix warning in ScriptConfigurationHighlightingTest

In case of exception from dependencies resolver
we do not threat the configurations as up-to-date,
so the reloading process will be started during test
despite updateScriptDependenciesSynchronously called at startup.
This will lead to the warning from checkHighlighting
because if script reports are different we rehighlight the script.
Note that test won't fail.
This commit is contained in:
Natalia Selezneva
2020-06-26 15:47:59 +03:00
parent 6ec13ab38a
commit b3a84ba081
@@ -8,11 +8,14 @@ import kotlin.script.experimental.location.*
class TestDependenciesResolver : DependenciesResolver {
override fun resolve(
scriptContents: ScriptContents,
environment: Environment
scriptContents: ScriptContents,
environment: Environment
): DependenciesResolver.ResolveResult {
error("Exception from resolver")
throw ex
}
// this is needed for equality of script reports to avoid highlighting restart during test
private val ex = IllegalStateException("Exception from resolver")
}
@ScriptExpectedLocations([ScriptExpectedLocation.Everywhere])