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 (2)
GitOrigin-RevId: 311dc9d67195ecd3f22821fdcc0f16352153bcf9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ba3d3c7f09
commit
04dca5f126
@@ -34,6 +34,7 @@ import org.junit.ClassRule
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
import java.lang.AssertionError
|
||||
|
||||
@RunsInEdt
|
||||
class DynamicPluginsTest {
|
||||
@@ -320,7 +321,15 @@ class DynamicPluginsTest {
|
||||
val descriptor = loadDescriptorInTest(plugin.toPath().parent.parent)
|
||||
descriptor.setLoader(DynamicPluginsTest::class.java.classLoader)
|
||||
DynamicPlugins.loadPlugin(descriptor, false)
|
||||
return Disposable { DynamicPlugins.unloadPlugin(loadDescriptorInTest(plugin.toPath().parent.parent), false) }
|
||||
|
||||
return Disposable {
|
||||
val unloadDescriptor = loadDescriptorInTest(plugin.toPath().parent.parent)
|
||||
val canBeUnloaded = DynamicPlugins.allowLoadUnloadWithoutRestart(descriptor)
|
||||
DynamicPlugins.unloadPlugin(unloadDescriptor, false)
|
||||
if (!canBeUnloaded) {
|
||||
throw AssertionError("'Allow unload without restart' returned false, why expected true")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class MyUISettingsListener : UISettingsListener {
|
||||
|
||||
Reference in New Issue
Block a user