public class TestDefaultPluginManager extends Object
If you're tempted to try to push mocks further through this, be aware that there are subclasses which need to wrap components and which react to events sent during processing. That is, these tests are also testing to some extent integration between DefaultPluginManager and DefaultPluginEventManager and other related classes.
| Modifier and Type | Class and Description |
|---|---|
static class |
TestDefaultPluginManager.DisabledPluginCounter |
static class |
TestDefaultPluginManager.MyModuleDisabledListener |
static class |
TestDefaultPluginManager.PluginDisabledListener |
static class |
TestDefaultPluginManager.PluginModuleDisabledListener |
static class |
TestDefaultPluginManager.PluginModuleEnabledListener |
static class |
TestDefaultPluginManager.RequiresRestartModuleDescriptor |
static class |
TestDefaultPluginManager.RequiresRestartSubclassModuleDescriptor |
| Modifier and Type | Field and Description |
|---|---|
CapturedLogging |
capturedLogging |
org.junit.rules.ExpectedException |
expectedException |
protected DefaultPluginManager |
manager
the object being tested
|
protected DefaultModuleDescriptorFactory |
moduleDescriptorFactory |
protected PluginEventManager |
pluginEventManager |
protected PluginPersistentStateStore |
pluginStateStore |
org.junit.contrib.java.lang.system.RestoreSystemProperties |
restoreSystemProperties |
| Constructor and Description |
|---|
TestDefaultPluginManager() |
public final CapturedLogging capturedLogging
public final org.junit.rules.ExpectedException expectedException
public final org.junit.contrib.java.lang.system.RestoreSystemProperties restoreSystemProperties
protected DefaultPluginManager manager
protected PluginPersistentStateStore pluginStateStore
protected DefaultModuleDescriptorFactory moduleDescriptorFactory
protected PluginEventManager pluginEventManager
protected DefaultPluginManager newDefaultPluginManager(DefaultPluginManager.Builder builder)
protected PluginAccessor getPluginAccessor()
public void testRetrievePlugins()
throws PluginParseException
PluginParseExceptionpublic void testEnableModuleFailed()
throws PluginParseException
PluginParseExceptionpublic void testEnabledModuleOutOfSyncWithPlugin()
throws PluginParseException
PluginParseExceptionpublic void disablePluginsBySafeModeShouldNotWorkInClusterEnvironment()
throws Exception
Exceptionpublic void disablePluginsBySafeModeManagerShouldNotAffectNewPlugins()
public void disableParticularPluginBySafeModeManagerShouldDisableAnyPlugin()
public void disableAllPluginsBySafeModeShouldNotDisableApplicationPlugins()
public void disableAllPluginsBySafeModeManagerShouldNotDisableRequiredPlugins()
public void disableAllPluginsBySafeModeManagerShouldNotDisableSystemPlugins()
public void testDisablePluginModuleWithCannotDisableAnnotation()
public void testDisablePluginModuleWithCannotDisableAnnotationInSuperclass()
public void testEnabledDisabledRetrieval()
throws PluginParseException
PluginParseExceptionpublic void testDuplicatePluginKeysAreIgnored()
throws PluginParseException
PluginParseExceptionpublic void testDuplicateSnapshotVersionsAreNotLoaded()
throws PluginParseException
PluginParseExceptionpublic void testChangedSnapshotVersionIsLoaded()
throws PluginParseException
PluginParseExceptionpublic void testLoadOlderDuplicatePlugin()
public void testLoadOlderDuplicatePluginDoesNotTryToEnableIt()
public void testLoadNewerDuplicatePlugin()
public void testLoadNewerDuplicateDynamicPluginPreservesPluginState()
throws PluginParseException
PluginParseExceptionpublic void testLoadNewerDuplicateDynamicPluginPreservesModuleState()
throws PluginParseException
PluginParseExceptionpublic void testLoadChangedDynamicPluginWithSameVersionNumberDoesNotReplaceExisting()
throws PluginParseException
PluginParseExceptionpublic void testGetPluginsWithPluginMatchingPluginPredicate()
throws Exception
Exceptionpublic void testGetPluginsWithPluginNotMatchingPluginPredicate()
public void testGetPluginModulesWithModuleMatchingPredicate()
throws Exception
Exceptionpublic void testGetPluginModulesWithGetModuleThrowingException()
throws Exception
Exceptionpublic void testGetPluginModulesWith2GetModulesThrowingExceptionOnlyNotifiesOnce()
throws Exception
Exceptionpublic void testGetPluginModulesWithModuleNotMatchingPredicate()
throws Exception
Exceptionpublic void testGetPluginModuleDescriptorWithModuleMatchingPredicate()
throws Exception
Exceptionpublic void testGetPluginModuleDescriptorsWithModuleNotMatchingPredicate()
throws Exception
Exceptionpublic void testGetPluginAndModules()
throws PluginParseException
PluginParseExceptionpublic void testGetModuleByModuleClassOneFound()
throws PluginParseException
PluginParseExceptionpublic void testGetModuleByModuleClassNoneFound()
throws PluginParseException
PluginParseExceptionpublic void testGetEnabledPluginsDoesNotReturnEnablingPlugins()
throws Exception
Exceptionpublic void testFindingNewPlugins()
throws PluginParseException,
IOException
PluginParseExceptionIOExceptionpublic void testFindingNewPluginsNotLoadingRestartRequiredDescriptors()
throws PluginParseException,
IOException
PluginParseExceptionIOExceptionpublic void testFindingUpgradePluginsNotLoadingRestartRequiredDescriptors()
throws PluginParseException,
IOException
PluginParseExceptionIOExceptionpublic void testInstallPluginThatRequiresRestart()
throws PluginParseException,
IOException,
InterruptedException
public void testInstallPluginThatRequiresRestartThenRevert()
throws PluginParseException,
IOException,
InterruptedException
public void testUpgradePluginThatRequiresRestart()
throws PluginParseException,
IOException,
InterruptedException
public void testUpgradePluginThatRequiresRestartThenReverted()
throws PluginParseException,
IOException,
InterruptedException
public void testUpgradePluginThatRequiresRestartThenRevertedRevertsToOriginalPlugin()
throws PluginParseException,
IOException,
InterruptedException
public void testUpgradePluginThatRequiresRestartMultipleTimeStaysUpgraded()
throws PluginParseException,
IOException,
InterruptedException
public void testUpgradePluginThatPreviouslyRequiredRestart()
throws PluginParseException,
IOException,
InterruptedException
public void testInstallPluginThatPreviouslyRequiredRestart()
throws PluginParseException,
IOException,
InterruptedException
public void testInstallPluginMoreThanOnceStaysAsInstall()
throws PluginParseException,
IOException,
InterruptedException
public void testRemovePluginThatRequiresRestart()
throws PluginParseException,
IOException
PluginParseExceptionIOExceptionpublic void testRemovePluginThatRequiresRestartThenReverted()
throws PluginParseException,
IOException
PluginParseExceptionIOExceptionpublic void testRemovePluginThatRequiresRestartViaSubclass()
throws PluginParseException,
IOException
PluginParseExceptionIOExceptionpublic void testDisableEnableOfPluginThatRequiresRestart()
throws PluginParseException,
IOException
PluginParseExceptionIOExceptionpublic void testCannotRemovePluginFromStaticLoader()
throws PluginParseException,
IOException
PluginParseExceptionIOExceptionpublic void testRemovingPlugins()
throws PluginException,
IOException
PluginExceptionIOExceptionpublic void testPluginModuleAvailableAfterInstallation()
public void testPluginModuleAvailableAfterInstallationButConfiguredToBeDisabled()
public void testPluginModuleUnavailableAfterInstallation()
public void testPluginModuleDisabledOnStartupUnavailableAfterInstallation()
public void testPluginContainerUnavailable()
public void testNonRemovablePlugins()
throws PluginParseException
PluginParseExceptionpublic void testNonDeletablePlugins()
throws PluginException,
IOException
PluginExceptionIOExceptionpublic void testInvalidationOfDynamicResourceCache()
throws IOException,
PluginException
IOExceptionPluginExceptionpublic void testValidatePlugin()
throws PluginParseException
PluginParseExceptionpublic void testValidatePluginWithNoDynamicLoaders()
throws PluginParseException
PluginParseExceptionpublic void testInvalidationOfDynamicClassCache()
throws IOException,
PluginException
IOExceptionPluginExceptionpublic void testInstallTwoPluginsButOneFailsToEnableAModuleAndThenFailsToDisableAModule()
public void testUninstallPluginClearsState()
throws IOException
IOExceptionpublic void testDisabledPluginClearsModulesByClass()
throws IOException
TestDefaultPluginManagerWithCachingPluginAccessorIOExceptionpublic void testUninstallPluginClearsModulesByClass()
throws IOException
TestDefaultPluginManagerWithCachingPluginAccessor: prove the cache doesn't need to listen to
pluginUninstalled: pluginDisabled is good enoughIOExceptionpublic void testGetPluginWithNullKey()
public void checkPluginInternal()
public void checkPluginInternalNotSo()
public void getDynamicModules()
Copyright © 2019 Atlassian. All rights reserved.