Skip to content

Commit

Permalink
Reenable predictions modules, disabling one trusty
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Zanini <[email protected]>
  • Loading branch information
ricardozanini committed Sep 29, 2022
1 parent 3e8ef67 commit b9e01ad
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import org.eclipse.microprofile.config.ConfigProvider;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.kie.kogito.tracing.decision.TrustyConstants;
Expand Down Expand Up @@ -57,6 +58,7 @@ public class QuarkusTracingAddonDevServicesIT {
"LoanEligibility.dmn");
});

// TODO: trusty services is running on 8080
@Test
public void testEvaluateLoanEligibility() {
execute().then()
Expand All @@ -66,19 +68,19 @@ public void testEvaluateLoanEligibility() {
}

@Test
@Disabled("Not working, need debugging")
public void testExecutionsAreStored() {
final List<String> executionIds = new ArrayList<>();
executionIds.add(executeAndGetExecutionId());
executionIds.add(executeAndGetExecutionId());
executionIds.add(executeAndGetExecutionId());

final String trustyServiceEndpoint = System.getProperty(TrustyConstants.KOGITO_TRUSTY_SERVICE);

await()
.atMost(30, TimeUnit.SECONDS)
.pollInterval(500, TimeUnit.MILLISECONDS)
.until(() -> {
final Response response = baseRequest().when().get(trustyServiceEndpoint + "/executions");
final Response response = given().when().get(trustyServiceEndpoint + "/executions");
final String json = response.prettyPrint();
return executionIds.stream().allMatch(executionId -> json.contains("\"executionId\": \"" + executionId + "\""));
});
Expand Down
2 changes: 0 additions & 2 deletions quarkus/addons/tracing-decision/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
<modules>
<module>deployment</module>
<module>runtime</module>
<!-- TODO: investigate why it's failing (the systemproperty get seems odd), and review the 8080 port usage
<module>integration-tests</module>
-->
</modules>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import java.util.Map;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import io.quarkus.test.junit.QuarkusTest;
Expand All @@ -27,8 +26,6 @@
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;

// TODO: failing, report later
@Disabled
@QuarkusTest
public class CustomEndpointIT {

Expand All @@ -47,4 +44,4 @@ public void testHelloEndpoint() {
.body("data.fld4", is(52.5f));
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package org.kie.kogito.quarkus.pmml;

import io.quarkus.test.junit.NativeImageTest;
import io.quarkus.test.junit.QuarkusIntegrationTest;

@NativeImageTest
@QuarkusIntegrationTest
public class NativeCustomEndpointIT extends CustomEndpointIT {

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
package org.kie.kogito.quarkus.pmml;

import io.quarkus.test.junit.NativeImageTest;
import io.quarkus.test.junit.QuarkusIntegrationTest;

@NativeImageTest
@QuarkusIntegrationTest
class NativePMMLRegressionIT extends PMMLRegressionIT {

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.util.Collections;
import java.util.Map;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import io.quarkus.test.junit.QuarkusTest;
Expand All @@ -27,8 +26,6 @@
import static org.kie.kogito.quarkus.pmml.CommonTestUtils.testDescriptive;
import static org.kie.kogito.quarkus.pmml.CommonTestUtils.testResult;

// TODO: failing, report later
@Disabled
@QuarkusTest
class PMMLRegressionIT {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
quarkus.http.test-port=0
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
<modules>
<module>kogito-quarkus-predictions-deployment</module>
<module>kogito-quarkus-predictions</module>
<!-- TODO: investigate the error Caused by: java.io.FileNotFoundException: ./target/classes/IndexFile.pmml_json (No such file or directory)
<module>kogito-quarkus-predictions-integration-test</module>
-->
</modules>

</project>

0 comments on commit b9e01ad

Please sign in to comment.