jamesnetherton commented on code in PR #5024:
URL: https://github.com/apache/camel-quarkus/pull/5024#discussion_r1245216290
##########
extensions/micrometer/deployment/src/main/java/org/apache/camel/quarkus/component/micrometer/deployment/MicrometerProcessor.java:
##########
@@ -65,4 +67,13 @@ RuntimeCamelContextCustomizerBuildItem
runtimeContextCustomizer(
return new RuntimeCamelContextCustomizerBuildItem(
recorder.createRuntimeContextCustomizer(config,
rootMeterRegistryBuildItem.getValue()));
}
+
+ @Record(ExecutionTime.STATIC_INIT)
+ @BuildStep
+ CamelRuntimeBeanBuildItem tikaComponent(CamelMicrometerRecorder recorder) {
Review Comment:
```suggestion
CamelRuntimeBeanBuildItem micrometerComponent(CamelMicrometerRecorder
recorder) {
```
##########
extensions/micrometer/deployment/src/test/java/org/apache/camel/quarkus/component/micrometer/deployment/MicrometerSimpleMeterRegistryTest.java:
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.micrometer.deployment;
+
+import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
+import io.quarkus.test.QuarkusUnitTest;
+import jakarta.inject.Inject;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.micrometer.MicrometerComponent;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class MicrometerSimpleMeterRegistryTest {
+
+ @RegisterExtension
+ static final QuarkusUnitTest CONFIG = new QuarkusUnitTest()
+ .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class));
+ @Inject
+ CamelContext context;
+
+ @Test
+ public void testQuarkusSchedulerAutowired() throws Exception {
Review Comment:
```suggestion
public void testDefaultSimpleMeterRegistry() throws Exception {
```
##########
extensions/micrometer/deployment/src/test/java/org/apache/camel/quarkus/component/micrometer/deployment/MicrometerSimpleMeterRegistryTest.java:
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.micrometer.deployment;
+
+import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
+import io.quarkus.test.QuarkusUnitTest;
+import jakarta.inject.Inject;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.micrometer.MicrometerComponent;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class MicrometerSimpleMeterRegistryTest {
+
+ @RegisterExtension
+ static final QuarkusUnitTest CONFIG = new QuarkusUnitTest()
+ .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class));
+ @Inject
+ CamelContext context;
+
+ @Test
+ public void testQuarkusSchedulerAutowired() throws Exception {
+ MicrometerComponent component = context.getComponent("micrometer",
MicrometerComponent.class);
+ assertTrue(component.getMetricsRegistry() instanceof
SimpleMeterRegistry, "SimpleMeterRegistry");
Review Comment:
```suggestion
assertInstanceOf(SimpleMeterRegistry.class,
component.getMetricsRegistry() );
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]