Search in sources :

Example 31 with KieCompilationResponse

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

the class DefaultRemoteExecutorTest method buildSpecializedSkipDepsNonExistentProject.

@Test
public void buildSpecializedSkipDepsNonExistentProject() throws Exception {
    DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService);
    CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, new String[] { MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE }, Boolean.TRUE);
    KieCompilationResponse res = futureRes.get();
    assertThat(res.isSuccessful()).isFalse();
}
Also used : KieCompilationResponse(org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse) BaseCompilerTest(org.kie.workbench.common.services.backend.compiler.BaseCompilerTest) Test(org.junit.Test)

Example 32 with KieCompilationResponse

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

the class DefaultRemoteExecutorTest method buildSpecializedNonExistentProject.

@Test
public void buildSpecializedNonExistentProject() throws Exception {
    DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService);
    CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, new String[] { MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE });
    KieCompilationResponse res = futureRes.get();
    assertThat(res.isSuccessful()).isFalse();
}
Also used : KieCompilationResponse(org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse) BaseCompilerTest(org.kie.workbench.common.services.backend.compiler.BaseCompilerTest) Test(org.junit.Test)

Example 33 with KieCompilationResponse

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

the class DefaultRemoteExecutorTest method buildAndSkipDepsNonExistentProject.

@Test
public void buildAndSkipDepsNonExistentProject() throws Exception {
    DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService);
    CompletableFuture<KieCompilationResponse> futureRes = executor.build(tmpRoot.toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.FALSE);
    KieCompilationResponse res = futureRes.get();
    assertThat(res.isSuccessful()).isFalse();
    assertThat(res.getDependencies()).isEmpty();
}
Also used : KieCompilationResponse(org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse) BaseCompilerTest(org.kie.workbench.common.services.backend.compiler.BaseCompilerTest) Test(org.junit.Test)

Example 34 with KieCompilationResponse

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

the class DefaultRemoteExecutorTest method buildAndInstallSkipDepsExistentProject.

@Test
@Ignore("https://issues.redhat.com/browse/AF-2892")
public void buildAndInstallSkipDepsExistentProject() throws Exception {
    DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService);
    CompletableFuture<KieCompilationResponse> futureRes = executor.buildAndInstall(Paths.get(tmpRoot.toAbsolutePath() + "/dummy").toAbsolutePath().toString(), mavenRepoPath, TestUtilMaven.getSettingsFile(), Boolean.TRUE);
    KieCompilationResponse res = futureRes.get();
    assertThat(res.isSuccessful()).isTrue();
    assertThat(res.getDependencies()).isEmpty();
}
Also used : KieCompilationResponse(org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse) Ignore(org.junit.Ignore) BaseCompilerTest(org.kie.workbench.common.services.backend.compiler.BaseCompilerTest) Test(org.junit.Test)

Example 35 with KieCompilationResponse

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

the class DefaultRemoteExecutorTest method buildSpecializedSkipDepsExistentProject.

@Test
@Ignore("https://issues.redhat.com/browse/AF-2892")
public void buildSpecializedSkipDepsExistentProject() throws Exception {
    DefaultRemoteExecutor executor = new DefaultRemoteExecutor(executorService);
    CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(Paths.get(tmpRoot.toAbsolutePath() + "/dummy").toAbsolutePath().toString(), mavenRepoPath, new String[] { MavenCLIArgs.ALTERNATE_USER_SETTINGS + TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE }, Boolean.TRUE);
    KieCompilationResponse res = futureRes.get();
    assertThat(res.isSuccessful()).isTrue();
}
Also used : KieCompilationResponse(org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse) Ignore(org.junit.Ignore) BaseCompilerTest(org.kie.workbench.common.services.backend.compiler.BaseCompilerTest) Test(org.junit.Test)

Aggregations

KieCompilationResponse (org.kie.workbench.common.services.backend.compiler.impl.kie.KieCompilationResponse)65 Test (org.junit.Test)58 BaseCompilerTest (org.kie.workbench.common.services.backend.compiler.BaseCompilerTest)48 Ignore (org.junit.Ignore)30 DefaultCompilationRequest (org.kie.workbench.common.services.backend.compiler.impl.DefaultCompilationRequest)17 WorkspaceCompilationInfo (org.kie.workbench.common.services.backend.compiler.impl.WorkspaceCompilationInfo)13 CompilationRequest (org.kie.workbench.common.services.backend.compiler.CompilationRequest)12 Path (org.uberfire.java.nio.file.Path)11 AFCompiler (org.kie.workbench.common.services.backend.compiler.AFCompiler)7 InternalKieModule (org.drools.compiler.kie.builder.impl.InternalKieModule)6 KieModuleMetaInfo (org.drools.core.rule.KieModuleMetaInfo)6 KieModule (org.kie.api.builder.KieModule)6 File (java.io.File)5 FileInputStream (java.io.FileInputStream)5 InputStream (java.io.InputStream)5 HashMap (java.util.HashMap)5 BaseMavenCompiler (org.kie.workbench.common.services.backend.compiler.impl.BaseMavenCompiler)4 CountDownLatch (java.util.concurrent.CountDownLatch)3 ExecutionException (java.util.concurrent.ExecutionException)3 ExecutorService (java.util.concurrent.ExecutorService)3