use of org.jenkinsci.test.acceptance.FallbackConfig in project acceptance-test-harness by jenkinsci.
the class World method configure.
@Override
protected void configure() {
// lowest priority is our default binding
Module m = new FallbackConfig();
// let extensions override the fallback config
m = Modules.override(m).with(new ExtensionFinder(cl));
// user config trumps everything
m = Modules.override(m).with(new Config());
install(m);
}
use of org.jenkinsci.test.acceptance.FallbackConfig in project acceptance-test-harness by jenkinsci.
the class JenkinsControllerPoolProcess method run.
public void run() throws Exception {
// so the actual length of the queue has to be n-1.
if (n == 1)
queue = new SynchronousQueue<>();
else
queue = new LinkedBlockingDeque<>(n - 1);
World w = World.get();
w.getInjector().injectMembers(this);
new Thread() {
/**
* Just keeps on creating new controllers and put it into the queue.
* Because queue is blocking, this will only prelaunch up to 3.
*/
@Override
public void run() {
try {
FallbackConfig f = new FallbackConfig();
while (true) {
lifecycle.startTestScope();
JenkinsController c = f.createController(injector, factories);
c.start();
queue.put(new QueueItem(c, lifecycle.export()));
}
} catch (Throwable e) {
// fail fatally
e.printStackTrace();
System.exit(1);
}
}
}.start();
processServerSocket();
}
Aggregations