Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.x: Helidon Arquillian module should only depend on MP core #7440

Merged
merged 3 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions microprofile/tests/arquillian/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@
</dependency>
<dependency>
<groupId>io.helidon.microprofile.bundles</groupId>
<artifactId>helidon-microprofile</artifactId>
<exclusions>
<exclusion>
<groupId>io.helidon.health</groupId>
<artifactId>helidon-health-checks</artifactId>
</exclusion>
</exclusions>
<artifactId>helidon-microprofile-core</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand All @@ -70,5 +64,13 @@
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</dependency>
<dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it depend on MP metrics?

Copy link
Member Author

@jbescos jbescos Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fails otherwise with some injection error I think because of HelidonDeployableContainer#cleanupBaseMetrics, Right now arquillian-helidon requires it.

Update: see the error in the next comment

<groupId>org.eclipse.microprofile.metrics</groupId>
<artifactId>microprofile-metrics-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@

import io.helidon.config.mp.MpConfigSources;

import jakarta.enterprise.inject.ResolutionException;
import jakarta.enterprise.inject.se.SeContainer;
import jakarta.enterprise.inject.spi.CDI;
import jakarta.enterprise.inject.spi.DefinitionException;
Expand Down Expand Up @@ -583,9 +584,10 @@ private void cleanupBaseMetrics() {
new BaseRegistryTypeLiteral()).get();
Objects.requireNonNull(metricRegistry);
metricRegistry.removeMatching((m, v) -> true);
} catch (IllegalStateException e) {
} catch (IllegalStateException | ResolutionException e) {
// this may be a negative CDI test (e.g. when CDI is intended not to start)
// in such cases, CDI will not be available
// It can also be that metrics are not used at all in some tests, so we don't want to fail.
LOGGER.log(Level.DEBUG, "Unable to cleanup base metrics", e);
}
}
Expand Down
5 changes: 5 additions & 0 deletions microprofile/tests/tck/tck-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
<name>Helidon Microprofile Tests TCK CDI</name>

<dependencies>
<dependency>
<groupId>io.helidon.microprofile.cdi</groupId>
<artifactId>helidon-microprofile-cdi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.tests</groupId>
<artifactId>helidon-arquillian</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<name>Helidon Microprofile Tests TCK Core Profile</name>

<dependencies>
<dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you depend on the whole thing here? It should be sufficient to depend on the core, as core profile should be already supported by core.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, for some reason I thought this was testing a small parts of different microprofile things.

<groupId>io.helidon.microprofile.bundles</groupId>
<artifactId>helidon-microprofile-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.tests</groupId>
<artifactId>helidon-arquillian</artifactId>
Expand Down
10 changes: 8 additions & 2 deletions microprofile/tests/tck/tck-fault-tolerance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,21 @@
</properties>

<dependencies>
<dependency>
<groupId>io.helidon.microprofile.metrics</groupId>
<artifactId>helidon-microprofile-metrics</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.tests</groupId>
<artifactId>helidon-arquillian</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.bundles</groupId>
<artifactId>helidon-microprofile</artifactId>
<groupId>io.helidon.microprofile</groupId>
<artifactId>helidon-microprofile-fault-tolerance</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
Expand Down
5 changes: 5 additions & 0 deletions microprofile/tests/tck/tck-health/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
<name>Helidon Microprofile Tests TCK Health</name>

<dependencies>
<dependency>
<groupId>io.helidon.microprofile.health</groupId>
<artifactId>helidon-microprofile-health</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics seem to be added to all poms, including the arqulilian. Please explain

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the first comments. It is required if you use Helidon Arquillian.

<groupId>io.helidon.microprofile.tests</groupId>
<artifactId>helidon-arquillian</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions microprofile/tests/tck/tck-inject/tck-inject-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.bundles</groupId>
<artifactId>helidon-microprofile</artifactId>
<groupId>io.helidon.microprofile.cdi</groupId>
tomas-langer marked this conversation as resolved.
Show resolved Hide resolved
<artifactId>helidon-microprofile-cdi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
5 changes: 0 additions & 5 deletions microprofile/tests/tck/tck-jsonb/tck-jsonb-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.bundles</groupId>
<artifactId>helidon-microprofile</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-tck</artifactId>
Expand Down
10 changes: 5 additions & 5 deletions microprofile/tests/tck/tck-jsonp/tck-jsonp-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.bundles</groupId>
<artifactId>helidon-microprofile</artifactId>
<scope>test</scope>
</dependency>
<!-- Dependencies coming from below maven-antrun-plugin -->
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-tests</artifactId>
<version>${version.lib.jakarta.jsonp-api}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
27 changes: 5 additions & 22 deletions microprofile/tests/tck/tck-lra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
</properties>

<dependencies>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-binding</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.microprofile.lra</groupId>
<artifactId>microprofile-lra-tck</artifactId>
Expand All @@ -40,28 +45,6 @@
<groupId>io.helidon.microprofile.tests</groupId>
<artifactId>helidon-arquillian</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<artifactId>helidon-microprofile-openapi</artifactId>
<groupId>io.helidon.microprofile.openapi</groupId>
</exclusion>
<exclusion>
<groupId>io.helidon.microprofile.tracing</groupId>
<artifactId>helidon-microprofile-tracing</artifactId>
</exclusion>
<exclusion>
<groupId>io.helidon.microprofile.metrics</groupId>
<artifactId>helidon-microprofile-metrics</artifactId>
</exclusion>
<exclusion>
<groupId>io.helidon.microprofile</groupId>
<artifactId>helidon-microprofile-fault-tolerance</artifactId>
</exclusion>
<exclusion>
<groupId>io.helidon.microprofile.jwt</groupId>
<artifactId>helidon-microprofile-jwt-auth</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.lra</groupId>
Expand Down
5 changes: 5 additions & 0 deletions microprofile/tests/tck/tck-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<name>Helidon Microprofile Tests TCK Metrics</name>

<dependencies>
<dependency>
<groupId>io.helidon.microprofile.metrics</groupId>
<artifactId>helidon-microprofile-metrics</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.tests</groupId>
<artifactId>helidon-arquillian</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions microprofile/tests/tck/tck-openapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.helidon.microprofile.openapi</groupId>
<artifactId>helidon-microprofile-openapi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.tests</groupId>
<artifactId>helidon-arquillian</artifactId>
Expand Down
20 changes: 20 additions & 0 deletions microprofile/tests/tck/tck-opentracing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,26 @@
<name>Helidon Microprofile Tests TCK Opentracing</name>

<dependencies>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-binding</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.tracing</groupId>
<artifactId>helidon-microprofile-tracing</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.rest-client</groupId>
<artifactId>helidon-microprofile-rest-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.server</groupId>
<artifactId>helidon-microprofile-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.tests</groupId>
<artifactId>helidon-arquillian</artifactId>
Expand Down
6 changes: 0 additions & 6 deletions microprofile/tests/tck/tck-reactive-operators/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@
<artifactId>helidon-arquillian</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>io.helidon.microprofile.bundles</groupId>
<artifactId>helidon-microprofile-3.1</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.reactive-streams</groupId>
Expand Down
15 changes: 15 additions & 0 deletions microprofile/tests/tck/tck-rest-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@
<name>Helidon Microprofile Tests TCK REST Client</name>

<dependencies>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-binding</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.rest-client</groupId>
<artifactId>helidon-microprofile-rest-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.server</groupId>
<artifactId>helidon-microprofile-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.tests</groupId>
<artifactId>helidon-arquillian</artifactId>
Expand Down