Class LocalSlaveController
- All Implemented Interfaces:
Closeable
,AutoCloseable
,AutoCleaned
,CapybaraPortingLayer
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
CapybaraPortingLayerImpl.Finder<R>, CapybaraPortingLayerImpl.Resolver
-
Field Summary
Fields inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
driver, injector, LABEL_TO_INPUT_XPATH, time
Fields inherited from interface org.jenkinsci.test.acceptance.po.CapybaraPortingLayer
by
-
Constructor Summary
-
Method Summary
Methods inherited from class org.jenkinsci.test.acceptance.slave.SlaveController
restart, start, stop
Methods inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
all, blur, check, check, check, choose, clickButton, clickLink, confirmAlert, elasticSleep, executeScript, fillIn, find, findCaption, findCaption, findIfNotVisible, getCurrentUrl, getCurrentUrlWithFragment, getElement, getPageContent, getPageSource, getPageSource, getPath, handleAlert, isHiddenOrStale, isStale, last, lastIfNotVisible, newInstance, resource, runThenConfirmAlert, runThenConfirmAlert, runThenHandleAlert, runThenHandleAlert, runThenHandleDialog, runThenHandleInputDialog, sleep, visit, waitFor, waitFor, waitFor, waitFor, waitFor, waitForCond, waitForCond
-
Constructor Details
-
LocalSlaveController
public LocalSlaveController()
-
-
Method Details
-
install
Description copied from class:SlaveController
Uses the given page object to create a new node and connect the slave to that Jenkins instance.Since the actual launch of slave can take some time and it often involves a busy loop until the slave gets fully launched, this method returns
Future
and it can return before the slave is fully connected.However, this does not mean the setup process can run entirely in another thread, as
WebDriver
do not support concurrent use by multiple threads.For example, SSH slaves might synchronously interact with Jenkins to create a slave, and let Jenkins begin connecting to it, but this method would return without waiting for the slave to fully come online. Then later when
Future.get()
method is invoked, it'll check back the slave status and block until the slave becomes online.This design improves the speed of connecting multiple slaves.
TODO: for EC2 based providers where there's also another initial delay of allocating a new machine, this abstraction doesn't hide all the latencies sufficiently.
When the
Future.get()
method returns successfully, the slave is fully online and ready to use.- Specified by:
install
in classSlaveController
-
close
Description copied from class:SlaveController
Convey the intention that this machine is no longer needed. The implementation will releases this machine / recycle the machine, etc.Once this method is called, no other methods should be called.
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classSlaveController
- Throws:
IOException
-