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:
+6
-3
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user