Class PooledJenkinsController
java.lang.Object
org.jenkinsci.test.acceptance.controller.JenkinsController
org.jenkinsci.test.acceptance.server.PooledJenkinsController
- All Implemented Interfaces:
Closeable,AutoCloseable,IJenkinsController,AutoCleaned,LogListenable
JenkinsController that talks to JenkinsControllerPoolProcess over Unix domain socket.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.jenkinsci.test.acceptance.controller.JenkinsController
injector, isQuite, STARTUP_TIMEOUT, WORKSPACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidPerform controller specific diagnostics for test failure.getUrl()Gives URL where Jenkins is listening.voidpopulateJenkinsHome(byte[] template, boolean clean) Populates the Jenkins Home with the specified ZIP template.voidvoidstartNow()Synchronously start Jenkins instance until it starts responding to the specified URL.voidstopNow()Synchronously shutdown Jenkins instance.voidtearDown()Assuming the instance had already stopped, destroy JENKINS_HOME and release resources used by Jenkins.Methods inherited from class org.jenkinsci.test.acceptance.controller.JenkinsController
close, getInitialCredentials, getLogId, getLogPrinter, isRunning, postConstruct, restart, start, stop
-
Constructor Details
-
PooledJenkinsController
-
-
Method Details
-
addLogListener
- Specified by:
addLogListenerin interfaceLogListenable
-
removeLogListener
- Specified by:
removeLogListenerin interfaceLogListenable
-
startNow
Description copied from class:JenkinsControllerSynchronously start Jenkins instance until it starts responding to the specified URL.- Specified by:
startNowin classJenkinsController- Throws:
IOException
-
stopNow
Description copied from class:JenkinsControllerSynchronously shutdown Jenkins instance.This method must leave JENKINS_HOME intact so that it can be started later. To really delete the data and clean up, see
JenkinsController.tearDown().- Specified by:
stopNowin classJenkinsController- Throws:
IOException
-
populateJenkinsHome
Description copied from interface:IJenkinsControllerPopulates the Jenkins Home with the specified ZIP template. Jenkins will not be restarted, so if the content would require a restart you have to do this yourself.- Specified by:
populateJenkinsHomein interfaceIJenkinsController- Parameters:
template- The template (ZIP format).clean- iftruethen the home will be wiped clean before the template is applied. If false then the template will simply overwrite the existing (if any) home.- Throws:
IOException
-
getUrl
Description copied from class:JenkinsControllerGives URL where Jenkins is listening. Must end with "/"- Specified by:
getUrlin interfaceIJenkinsController- Specified by:
getUrlin classJenkinsController
-
tearDown
Description copied from class:JenkinsControllerAssuming the instance had already stopped, destroy JENKINS_HOME and release resources used by Jenkins.- Specified by:
tearDownin classJenkinsController- Throws:
IOException
-
diagnose
Description copied from class:JenkinsControllerPerform controller specific diagnostics for test failure. Defaults to no-op.- Overrides:
diagnosein classJenkinsController- Parameters:
cause- Failure cause
-