Class WinstoneController
- java.lang.Object
-
- org.jenkinsci.test.acceptance.controller.JenkinsController
-
- org.jenkinsci.test.acceptance.controller.LocalController
-
- org.jenkinsci.test.acceptance.controller.WinstoneController
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,IJenkinsController
,AutoCleaned
,LogListenable
public class WinstoneController extends LocalController
Launches Jenkins via "java -jar jenkins.war" on the local machine.- Author:
- Vivek Pandey
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WinstoneController.FactoryImpl
-
Nested classes/interfaces inherited from class org.jenkinsci.test.acceptance.controller.LocalController
LocalController.LocalFactoryImpl
-
-
Field Summary
Fields Modifier and Type Field Description protected int
httpPort
-
Fields inherited from class org.jenkinsci.test.acceptance.controller.LocalController
jenkinsHome, logWatcher, process, time, war
-
Fields inherited from class org.jenkinsci.test.acceptance.controller.JenkinsController
isQuite, STARTUP_TIMEOUT, WORKSPACE
-
-
Constructor Summary
Constructors Constructor Description WinstoneController(com.google.inject.Injector i)
WinstoneController(com.google.inject.Injector i, int httpPort)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addJavaOpt(String javaOpt)
protected static List<String>
envVarOpts(String jenkins_opts)
String
getLogId()
Returns the short ID used to prefix log output from the process into the test.URL
getUrl()
Gives URL where Jenkins is listening.protected void
onReady()
Called when the Jenkins instance is ready to be used.void
startNow()
Synchronously start Jenkins instance until it starts responding to the specified URL.org.jenkinsci.utils.process.ProcessInputStream
startProcess()
String
toString()
-
Methods inherited from class org.jenkinsci.test.acceptance.controller.LocalController
addLogListener, commonLaunchEnv, diagnose, getJavaHome, getJenkinsHome, getSlaveJarPath, getSutHostName, isRunInstallWizard, populateJenkinsHome, postConstruct, removeLogListener, setRunInstallWizard, stopNow, tearDown
-
Methods inherited from class org.jenkinsci.test.acceptance.controller.JenkinsController
close, getInitialCredentials, getLogPrinter, isRunning, restart, start, stop
-
-
-
-
Method Detail
-
addJavaOpt
public void addJavaOpt(String javaOpt)
-
startNow
public void startNow() throws IOException
Description copied from class:JenkinsController
Synchronously start Jenkins instance until it starts responding to the specified URL.- Overrides:
startNow
in classLocalController
- Throws:
IOException
-
onReady
protected void onReady() throws IOException
Description copied from class:LocalController
Called when the Jenkins instance is ready to be used.- Overrides:
onReady
in classLocalController
- Throws:
IOException
-
startProcess
public org.jenkinsci.utils.process.ProcessInputStream startProcess() throws IOException
- Specified by:
startProcess
in classLocalController
- Throws:
IOException
-
getUrl
public URL getUrl()
Description copied from class:JenkinsController
Gives URL where Jenkins is listening. Must end with "/"- Specified by:
getUrl
in interfaceIJenkinsController
- Specified by:
getUrl
in classJenkinsController
-
getLogId
public String getLogId()
Description copied from class:JenkinsController
Returns the short ID used to prefix log output from the process into the test.- Overrides:
getLogId
in classJenkinsController
-
-