Search in sources :

Example 1 with DefaultServicesStartStrategy

use of org.eclipse.che.api.environment.server.DefaultServicesStartStrategy in project che by eclipse.

the class WorkspaceRuntimeIntegrationTest method setUp.

@BeforeMethod
public void setUp() throws Exception {
    CheEnvironmentEngine environmentEngine = new CheEnvironmentEngine(snapshotDao, machineInstanceProviders, "/tmp", 2000, eventService, environmentParser, new DefaultServicesStartStrategy(), instanceProvider, infrastructureProvisioner, "http://localhost:8080/api", recipeDownloader, containerNameGenerator, agentRegistry, sharedPool);
    runtimes = new WorkspaceRuntimes(eventService, environmentEngine, agentSorter, launcherFactory, agentRegistry, snapshotDao, sharedPool);
    executor = Executors.newFixedThreadPool(1, new ThreadFactoryBuilder().setNameFormat(this.getClass().toString() + "-%d").build());
    EnvironmentContext.getCurrent().setSubject(new SubjectImpl("name", "id", "token", false));
}
Also used : CheEnvironmentEngine(org.eclipse.che.api.environment.server.CheEnvironmentEngine) ThreadFactoryBuilder(com.google.common.util.concurrent.ThreadFactoryBuilder) DefaultServicesStartStrategy(org.eclipse.che.api.environment.server.DefaultServicesStartStrategy) SubjectImpl(org.eclipse.che.commons.subject.SubjectImpl) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

ThreadFactoryBuilder (com.google.common.util.concurrent.ThreadFactoryBuilder)1 CheEnvironmentEngine (org.eclipse.che.api.environment.server.CheEnvironmentEngine)1 DefaultServicesStartStrategy (org.eclipse.che.api.environment.server.DefaultServicesStartStrategy)1 SubjectImpl (org.eclipse.che.commons.subject.SubjectImpl)1 BeforeMethod (org.testng.annotations.BeforeMethod)1