Search in sources :

Example 1 with CompilerOffprocessServiceImpl

use of org.kie.workbench.common.services.backend.compiler.offprocess.service.impl.CompilerOffprocessServiceImpl in project kie-wb-common by kiegroup.

the class CompilerOffProcessServiceTest method offProcessServiceCompileAsyncTest.

@Test
@Ignore("https://issues.redhat.com/browse/AF-2892")
public void offProcessServiceCompileAsyncTest() throws Exception {
    CompilerOffprocessService service = new CompilerOffprocessServiceImpl(executor, queueProvider);
    WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(prjPath);
    String uuid = UUID.randomUUID().toString();
    CompilationRequest req = new DefaultCompilationRequest(mavenRepo, info, new String[] { MavenCLIArgs.COMPILE, MavenCLIArgs.ALTERNATE_USER_SETTINGS + alternateSettingsAbsPath }, Boolean.FALSE, uuid);
    CompletableFuture<KieCompilationResponse> futureRes = service.compile(req);
    logger.info("offProcessOneBuildAsyncTest build completed");
    KieCompilationResponse res = futureRes.get();
    assertThat(res).isNotNull();
    assertThat(res.isSuccessful()).isTrue();
    assertThat(res.getMavenOutput()).isNotEmpty();
    DefaultKieCompilationResponse kres = (DefaultKieCompilationResponse) res;
    assertThat(uuid).isEqualToIgnoringCase(kres.getRequestUUID());
}
Also used : DefaultKieCompilationResponse(org.kie.workbench.common.services.backend.compiler.impl.DefaultKieCompilationResponse) WorkspaceCompilationInfo(org.kie.workbench.common.services.backend.compiler.impl.WorkspaceCompilationInfo) DefaultCompilationRequest(org.kie.workbench.common.services.backend.compiler.impl.DefaultCompilationRequest) CompilerOffprocessServiceImpl(org.kie.workbench.common.services.backend.compiler.offprocess.service.impl.CompilerOffprocessServiceImpl) CompilationRequest(org.kie.workbench.common.services.backend.compiler.CompilationRequest) DefaultCompilationRequest(org.kie.workbench.common.services.backend.compiler.impl.DefaultCompilationRequest) KieCompilationResponse(org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse) DefaultKieCompilationResponse(org.kie.workbench.common.services.backend.compiler.impl.DefaultKieCompilationResponse) Ignore(org.junit.Ignore) CompilerChronicleCoordinatorTest(org.kie.workbench.common.services.backend.compiler.offprocess.CompilerChronicleCoordinatorTest) Test(org.junit.Test)

Aggregations

Ignore (org.junit.Ignore)1 Test (org.junit.Test)1 CompilationRequest (org.kie.workbench.common.services.backend.compiler.CompilationRequest)1 DefaultCompilationRequest (org.kie.workbench.common.services.backend.compiler.impl.DefaultCompilationRequest)1 DefaultKieCompilationResponse (org.kie.workbench.common.services.backend.compiler.impl.DefaultKieCompilationResponse)1 WorkspaceCompilationInfo (org.kie.workbench.common.services.backend.compiler.impl.WorkspaceCompilationInfo)1 KieCompilationResponse (org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse)1 CompilerChronicleCoordinatorTest (org.kie.workbench.common.services.backend.compiler.offprocess.CompilerChronicleCoordinatorTest)1 CompilerOffprocessServiceImpl (org.kie.workbench.common.services.backend.compiler.offprocess.service.impl.CompilerOffprocessServiceImpl)1