[
https://issues.jboss.org/browse/DROOLS-3900?page=com.atlassian.jira.plugi...
]
Tibor Zimanyi commented on DROOLS-3900:
---------------------------------------
The Quarkus guidelines are general guidelines for using Maven failsafe plugin for running
integration tests. This means that failsafe runs all tests matching "*IT.java"
as integration tests. So to support both native and nonnative integration tests, I created
Maven profiles with failsafe configuration [1] that for a nonnative run ignores native
tests and for a native run, it runs all tests. With this, it was needed to include a
naming convention for native tests. So for a test class to be run in a native run, it must
match "Native*IT.java" or "Native*IntegrationTest.java" wildcards.
It could be possible that with JUnit 5, JUnit will just ignore classes with @SubstrateTest
annotation, but we will see when migrating to JUnit 5. I would expect the filtering be
based on those annotations.
[1]
https://github.com/kiegroup/submarine-bom/blob/master/pom.xml#L902
Inheriting submarine-examples bom causes Quarkus Native Image
integration tests to run anyway on normal JVM
-----------------------------------------------------------------------------------------------------------
Key: DROOLS-3900
URL:
https://issues.jboss.org/browse/DROOLS-3900
Project: Drools
Issue Type: Bug
Affects Versions: 8.0.0.Final
Reporter: Matteo Mortari
Assignee: Tibor Zimanyi
Priority: Major
Labels: submarine
Fix For: 8.0.0.Final
Quarkus guidelines are for having Native image test in this form:
{code:java}
import io.quarkus.test.junit.SubstrateTest;
@SubstrateTest
public class NativeByNameDMNEndpointIT extends ByNameDMNEndpointTest {
// Execute the same tests but in native mode.
}
{code}
When the dmn example is inheriting from the submarine-examples bom, it causes those
IT-ending tests to run anyway even on normal JVM.
See this commit exhibit the issue even locally:
https://github.com/kiegroup/submarine-examples/pull/15/commits/1bdd53d89f...
Removing the pom inheritance, the test behavior is back Quarkus guideline
--
This message was sent by Atlassian Jira
(v7.12.1#712002)