From 0a38c3b36f98dbc88c2eeebc335abf4f129825b9 Mon Sep 17 00:00:00 2001 From: Johannes Beck Date: Fri, 8 Mar 2024 09:30:15 +0100 Subject: [PATCH] Fix problems with coverage & sonar --- Jenkinsfile | 5 +++++ pom.xml | 12 ++++++------ src/main/resources/META-INF/persistence.xml | 4 ++-- src/test/resources/test-persistence.xml | 4 ++-- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5302be0b..d18a63f0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,9 +31,14 @@ node { .image('registry.x1/j7beck/x1-wildfly-stomp-test-it:1.8') .withRun('-e MANAGEMENT=public -e HTTP=public --name stomp-test-it') { c -> + try { waitFor("http://${hostIp(c)}:9990/health/ready", 20, 3) withMaven(maven: 'Maven-3.9', mavenSettingsConfig: mavenSetting) { sh "mvn -Parq-remote verify -Djboss.managementAddress=${hostIp(c)}" + } + } finally { + junit '**/target/surefire-reports/TEST-*.xml' + jacoco(execPattern: '**/**.exec') } } } diff --git a/pom.xml b/pom.xml index 838f1339..24e2dd7a 100644 --- a/pom.xml +++ b/pom.xml @@ -809,18 +809,18 @@ shrinkwrap-resolver-impl-maven test - - org.jacoco - org.jacoco.core - ${jacoco.version} - test - org.wildfly.arquillian wildfly-arquillian-container-remote ${arquillian.wildfly.version} test + + org.jacoco + org.jacoco.core + ${jacoco.version} + test + diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index dc575d10..1817dd94 100644 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -1,7 +1,7 @@ + xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_2_2.xsd" + version="2.2"> java:jboss/datasources/stocksDS diff --git a/src/test/resources/test-persistence.xml b/src/test/resources/test-persistence.xml index 5fcdcab8..789418ca 100644 --- a/src/test/resources/test-persistence.xml +++ b/src/test/resources/test-persistence.xml @@ -1,7 +1,7 @@ + xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_2_2.xsd" + version="2.2"> java:jboss/datasources/stockstestDS