You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2023/06/29 20:21:55 UTC
[camel-quarkus] branch main updated: Micrometer: It is not necessary to produce JMXRegistry for the test #5030
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new a3f54ad1f9 Micrometer: It is not necessary to produce JMXRegistry for the test #5030
a3f54ad1f9 is described below
commit a3f54ad1f939d74d99a523f24b4d2f6f640fd186
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Thu Jun 29 15:56:26 2023 +0200
Micrometer: It is not necessary to produce JMXRegistry for the test #5030
---
.../camel/quarkus/component/micrometer/it/MicrometerTest.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/integration-tests/micrometer/src/test/java/org/apache/camel/quarkus/component/micrometer/it/MicrometerTest.java b/integration-tests/micrometer/src/test/java/org/apache/camel/quarkus/component/micrometer/it/MicrometerTest.java
index 5589f43a4a..6b677c92d5 100644
--- a/integration-tests/micrometer/src/test/java/org/apache/camel/quarkus/component/micrometer/it/MicrometerTest.java
+++ b/integration-tests/micrometer/src/test/java/org/apache/camel/quarkus/component/micrometer/it/MicrometerTest.java
@@ -32,6 +32,8 @@ import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.path.json.JsonPath;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -196,12 +198,13 @@ class MicrometerTest extends AbstractMicrometerTest {
assertEquals(result.get("camel.routes.added"), "7.0");
}
- @Test
+ @ParameterizedTest
+ @ValueSource(strings = { "metrics", "org.apache.camel.micrometer" }) //test uses domains from both default and custom JMX registries
@DisabledOnIntegrationTest // JMX is not supported in native mode
- public void testJMX() throws Exception {
+ public void testJMXQuarkusDomain(String domain) throws Exception {
MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
- ObjectName objectName = new ObjectName("org.apache.camel.micrometer:name=jvmClassesLoaded");
+ ObjectName objectName = new ObjectName(domain + ":name=jvmClassesLoaded");
Set<ObjectInstance> mbeans = mBeanServer.queryMBeans(objectName, null);
assertEquals(1, mbeans.size());