org.jvnet.hudson.test
Class TestPluginManager

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.PluginManager
          extended by org.jvnet.hudson.test.TestPluginManager
All Implemented Interfaces:
ModelObject, SearchableModelObject, SearchItem, OnMaster

public class TestPluginManager
extends PluginManager

PluginManager to speed up unit tests.

Instead of loading every plugin for every test case, this allows them to reuse a single plugin manager.

TODO: Plugin start/stop/postInitialize invocation semantics gets different. Perhaps

Author:
Kohsuke Kawaguchi
See Also:
HudsonTestCase.useLocalPluginManager

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.PluginManager
PluginManager.FailedPlugin, PluginManager.PluginCycleDependenciesMonitor, PluginManager.PluginUpdateMonitor, PluginManager.UberClassLoader
 
Field Summary
static PluginManager INSTANCE
           
 
Fields inherited from class hudson.PluginManager
activePlugins, CONFIGURE_UPDATECENTER, context, failedPlugins, FAST_LOOKUP, plugins, pluginUploaded, rootDir, uberClassLoader, UPLOAD_PLUGINS
 
Method Summary
protected  Collection<String> loadBundledPlugins()
          If the war file has any "/WEB-INF/plugins/[*.jpi | *.hpi]", extract them into the plugin directory.
 void stop()
          Orderly terminates all the plugins.
 
Methods inherited from class hudson.PluginManager
copyBundledPlugin, createPluginStrategy, discover, doInstall, doInstallNecessaryPlugins, doPrevalidateConfig, doProxyConfigure, doSiteConfigure, doUpdateSources, doUploadPlugin, dynamicLoad, getApi, getDisplayName, getFailedPlugins, getPlugin, getPlugin, getPlugins, getPlugins, getPluginStrategy, getProxyDescriptor, getSearchUrl, initTasks, isPluginUploaded, parseRequestedPlugins, prevalidateConfig, whichPlugin
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final PluginManager INSTANCE
Method Detail

loadBundledPlugins

protected Collection<String> loadBundledPlugins()
                                         throws Exception
Description copied from class: PluginManager
If the war file has any "/WEB-INF/plugins/[*.jpi | *.hpi]", extract them into the plugin directory.

Specified by:
loadBundledPlugins in class PluginManager
Returns:
File names of the bundled plugins. Like {"ssh-slaves.hpi","subvesrion.jpi"}
Throws:
Exception - Any exception will be reported and halt the startup.

stop

public void stop()
Description copied from class: PluginManager
Orderly terminates all the plugins.

Overrides:
stop in class PluginManager


Copyright © 2004-2013. All Rights Reserved.