mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
dynamic plugins: twice check that plugin can be unloaded
GitOrigin-RevId: c5744bd40b194af06334a5a7a72fe97c9a014bc2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
06980d1c4f
commit
ba3d3c7f09
@@ -7,6 +7,7 @@ import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.testFramework.assertions.Assertions
|
||||
import java.io.File
|
||||
import java.lang.AssertionError
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import kotlin.math.abs
|
||||
@@ -56,7 +57,12 @@ fun loadPluginWithText(pluginXml: String, loader: ClassLoader): Disposable {
|
||||
|
||||
return Disposable {
|
||||
descriptor = loadDescriptorInTest(plugin.toPath().parent.parent)
|
||||
val canBeUnloaded = DynamicPlugins.allowLoadUnloadWithoutRestart(descriptor)
|
||||
unloadPlugin(descriptor, false)
|
||||
|
||||
if (!canBeUnloaded) {
|
||||
throw AssertionError("'Allow unload without restart' returned false, why expected true")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user