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 17f28543c7 Migrate Quarkus-interop tests from 
extensions/extensions-jvm to integration-tests/integration-tests-jvm
17f28543c7 is described below

commit 17f28543c70cd737a601bdf40d51f2e48d50dc39
Author: JinyuChen97 <[email protected]>
AuthorDate: Tue Jul 21 09:58:23 2026 +0100

    Migrate Quarkus-interop tests from extensions/extensions-jvm to 
integration-tests/integration-tests-jvm
    
    Migrate QuarkusUnitTest-based tests that cover interoperability with Quarkus
    or non-Camel transitives out of the deployment modules and into their
    respective integration-tests modules using @QuarkusTest + @TestProfile, so 
that they can be exercised when
    running the test suite against alternate Quarkus platform BOMs.
    
    quartz (integration-tests/quartz):
    - Migrated: QuartzNotAutowiredTest, QuartzNoQuarkusSchedulerAutowiredTest,
    QuartzQuarkusSchedulerAutowiredTest, QuartzQuarkusSchedulerNotAutowiredTest,
    QuartzQuarkusCustomSchedulerAutowiredTest,
    QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest
    - Not migrated: QuartzQuarkusSchedulerAmbiguousAutowiredTest
    (startup failure asserted via setExpectedException, no @QuarkusTest 
equivalent)
---
 .../QuartzNoQuarkusSchedulerAutowiredTest.java     | 44 -------------
 .../quartz/deployment/QuartzNotAutowiredTest.java  | 45 -------------
 .../QuartzQuarkusCustomSchedulerAutowiredTest.java | 58 -----------------
 .../QuartzQuarkusSchedulerAutowiredTest.java       | 45 -------------
 ...kusSchedulerAutowiredWithSchedulerBeanTest.java | 75 ----------------------
 .../QuartzQuarkusSchedulerNotAutowiredTest.java    | 45 -------------
 ...lication-configuration-not-autowired.properties | 17 -----
 ...tion-quarkus-scheduler-not-autowired.properties | 18 ------
 integration-tests/quartz/pom.xml                   |  1 -
 .../quartz/it/CustomSchedulerProducer.java         | 44 +++++++++++++
 .../component/quartz/it/QuartzResource.java        |  8 +++
 .../quartz/it/QuartzSchedulerBeanProfile.java      | 68 ++++++++++++++++++++
 .../it/QuartzNoQuarkusSchedulerAutowiredTest.java  | 48 ++++++++++++++
 .../quartz/it/QuartzNotAutowiredTest.java          | 47 ++++++++++++++
 .../QuartzQuarkusCustomSchedulerAutowiredTest.java | 52 +++++++++++++++
 .../it/QuartzQuarkusSchedulerAutowiredTest.java    | 47 ++++++++++++++
 ...kusSchedulerAutowiredWithSchedulerBeanTest.java | 57 ++++++++++++++++
 .../it/QuartzQuarkusSchedulerNotAutowiredTest.java | 49 ++++++++++++++
 18 files changed, 420 insertions(+), 348 deletions(-)

diff --git 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzNoQuarkusSchedulerAutowiredTest.java
 
b/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzNoQuarkusSchedulerAutowiredTest.java
deleted file mode 100644
index be9bf21d6b..0000000000
--- 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzNoQuarkusSchedulerAutowiredTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.quartz.deployment;
-
-import io.quarkus.test.QuarkusUnitTest;
-import jakarta.inject.Inject;
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.quartz.QuartzComponent;
-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.assertEquals;
-
-public class QuartzNoQuarkusSchedulerAutowiredTest {
-
-    @RegisterExtension
-    static final QuarkusUnitTest CONFIG = new QuarkusUnitTest()
-            .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class));
-
-    @Inject
-    CamelContext context;
-
-    @Test
-    public void testQuarkusQuartzSchedulerNotAutowired() throws Exception {
-        QuartzComponent component = context.getComponent("quartz", 
QuartzComponent.class);
-        assertEquals("DefaultQuartzScheduler-camel-1", 
component.getScheduler().getSchedulerName());
-    }
-}
diff --git 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzNotAutowiredTest.java
 
b/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzNotAutowiredTest.java
deleted file mode 100644
index 059ea2890a..0000000000
--- 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzNotAutowiredTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.quartz.deployment;
-
-import io.quarkus.test.QuarkusUnitTest;
-import jakarta.inject.Inject;
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.quartz.QuartzComponent;
-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.assertEquals;
-
-public class QuartzNotAutowiredTest {
-
-    @RegisterExtension
-    static final QuarkusUnitTest CONFIG = new QuarkusUnitTest()
-            
.withConfigurationResource("application-configuration-not-autowired.properties")
-            .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class));
-
-    @Inject
-    CamelContext context;
-
-    @Test
-    public void testQuarkusQuartzSchedulerNotAutowired() throws Exception {
-        QuartzComponent component = context.getComponent("quartz", 
QuartzComponent.class);
-        assertEquals("DefaultQuartzScheduler-camel-1", 
component.getScheduler().getSchedulerName());
-    }
-}
diff --git 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusCustomSchedulerAutowiredTest.java
 
b/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusCustomSchedulerAutowiredTest.java
deleted file mode 100644
index 27bdaa2837..0000000000
--- 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusCustomSchedulerAutowiredTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.quartz.deployment;
-
-import java.util.Properties;
-
-import io.quarkus.test.QuarkusUnitTest;
-import jakarta.enterprise.inject.Produces;
-import jakarta.inject.Inject;
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.quartz.QuartzComponent;
-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 org.quartz.Scheduler;
-import org.quartz.SchedulerException;
-import org.quartz.impl.StdSchedulerFactory;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class QuartzQuarkusCustomSchedulerAutowiredTest {
-
-    @RegisterExtension
-    static final QuarkusUnitTest CONFIG = new QuarkusUnitTest()
-            .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class));
-
-    @Inject
-    CamelContext context;
-
-    @Test
-    public void testCustomSchedulerAutowired() throws Exception {
-        QuartzComponent component = context.getComponent("quartz", 
QuartzComponent.class);
-        assertEquals("customScheduler", 
component.getScheduler().getSchedulerName());
-    }
-
-    @Produces
-    public Scheduler produceScheduler() throws SchedulerException {
-        Properties prop = new Properties();
-        prop.setProperty("org.quartz.scheduler.instanceName", 
"customScheduler");
-        prop.setProperty("org.quartz.threadPool.threadCount", "2");
-        return new StdSchedulerFactory(prop).getScheduler();
-    }
-}
diff --git 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusSchedulerAutowiredTest.java
 
b/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusSchedulerAutowiredTest.java
deleted file mode 100644
index 55617f3eed..0000000000
--- 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusSchedulerAutowiredTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.quartz.deployment;
-
-import io.quarkus.test.QuarkusUnitTest;
-import jakarta.inject.Inject;
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.quartz.QuartzComponent;
-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.assertEquals;
-
-public class QuartzQuarkusSchedulerAutowiredTest {
-
-    @RegisterExtension
-    static final QuarkusUnitTest CONFIG = new QuarkusUnitTest()
-            
.withConfigurationResource("application-configuration-quartz-scheduler.properties")
-            .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class));
-
-    @Inject
-    CamelContext context;
-
-    @Test
-    public void testQuarkusSchedulerAutowired() throws Exception {
-        QuartzComponent component = context.getComponent("quartz", 
QuartzComponent.class);
-        assertEquals("QuarkusQuartzScheduler", 
component.getScheduler().getSchedulerName());
-    }
-}
diff --git 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest.java
 
b/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest.java
deleted file mode 100644
index 20111e4b87..0000000000
--- 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.quartz.deployment;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import io.quarkus.scheduler.Scheduled;
-import io.quarkus.test.QuarkusUnitTest;
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.inject.Inject;
-import org.apache.camel.CamelContext;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.quartz.QuartzComponent;
-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.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest {
-
-    @RegisterExtension
-    static final QuarkusUnitTest CONFIG = new QuarkusUnitTest()
-            .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class));
-
-    @Inject
-    CamelContext context;
-
-    private static final CountDownLatch quarkusQuartzLatch = new 
CountDownLatch(1);
-    private static final CountDownLatch camelQuartzLatch = new 
CountDownLatch(1);
-
-    @Test
-    public void testQuarkusSchedulerAutowired() throws Exception {
-        QuartzComponent component = context.getComponent("quartz", 
QuartzComponent.class);
-        assertEquals("QuarkusQuartzScheduler", 
component.getScheduler().getSchedulerName());
-        assertTrue(quarkusQuartzLatch.await(10, TimeUnit.SECONDS));
-        assertTrue(camelQuartzLatch.await(10, TimeUnit.SECONDS));
-    }
-
-    @ApplicationScoped
-    static final class SchedulerBean {
-        @Scheduled(every = "1s", concurrentExecution = 
Scheduled.ConcurrentExecution.SKIP)
-        public void scheduledQuarkusJob() {
-            quarkusQuartzLatch.countDown();
-        }
-    }
-
-    @ApplicationScoped
-    static final class Routes extends RouteBuilder {
-        @Override
-        public void configure() throws Exception {
-            from("quartz://scheduledCamelJob?cron=0/1+*+*+*+*+?")
-                    .process(exchange -> {
-                        camelQuartzLatch.countDown();
-                    });
-        }
-    }
-}
diff --git 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusSchedulerNotAutowiredTest.java
 
b/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusSchedulerNotAutowiredTest.java
deleted file mode 100644
index b1c6c08da1..0000000000
--- 
a/extensions/quartz/deployment/src/test/java/org/apache/camel/quarkus/component/quartz/deployment/QuartzQuarkusSchedulerNotAutowiredTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.quartz.deployment;
-
-import io.quarkus.test.QuarkusUnitTest;
-import jakarta.inject.Inject;
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.quartz.QuartzComponent;
-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.assertEquals;
-
-public class QuartzQuarkusSchedulerNotAutowiredTest {
-
-    @RegisterExtension
-    static final QuarkusUnitTest CONFIG = new QuarkusUnitTest()
-            
.withConfigurationResource("application-configuration-quarkus-scheduler-not-autowired.properties")
-            .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class));
-
-    @Inject
-    CamelContext context;
-
-    @Test
-    public void testQuarkusQuartzSchedulerNotAutowired() throws Exception {
-        QuartzComponent component = context.getComponent("quartz", 
QuartzComponent.class);
-        assertEquals("DefaultQuartzScheduler-camel-1", 
component.getScheduler().getSchedulerName());
-    }
-}
diff --git 
a/extensions/quartz/deployment/src/test/resources/application-configuration-not-autowired.properties
 
b/extensions/quartz/deployment/src/test/resources/application-configuration-not-autowired.properties
deleted file mode 100644
index 54cddcf948..0000000000
--- 
a/extensions/quartz/deployment/src/test/resources/application-configuration-not-autowired.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-camel.component.quartz.autowired-enabled = false
\ No newline at end of file
diff --git 
a/extensions/quartz/deployment/src/test/resources/application-configuration-quarkus-scheduler-not-autowired.properties
 
b/extensions/quartz/deployment/src/test/resources/application-configuration-quarkus-scheduler-not-autowired.properties
deleted file mode 100644
index 312f03092c..0000000000
--- 
a/extensions/quartz/deployment/src/test/resources/application-configuration-quarkus-scheduler-not-autowired.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-## ---------------------------------------------------------------------------
-## 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.
-## ---------------------------------------------------------------------------
-camel.component.quartz.autowired-enabled = false
-quarkus.scheduler.start-mode=forced
\ No newline at end of file
diff --git a/integration-tests/quartz/pom.xml b/integration-tests/quartz/pom.xml
index ec975c8446..c1a8003488 100644
--- a/integration-tests/quartz/pom.xml
+++ b/integration-tests/quartz/pom.xml
@@ -65,7 +65,6 @@
         </dependency>
     </dependencies>
 
-
     <profiles>
         <profile>
             <id>native</id>
diff --git 
a/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/CustomSchedulerProducer.java
 
b/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/CustomSchedulerProducer.java
new file mode 100644
index 0000000000..d26ca8f5ae
--- /dev/null
+++ 
b/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/CustomSchedulerProducer.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.quartz.it;
+
+import java.util.Properties;
+
+import io.quarkus.arc.profile.IfBuildProfile;
+import jakarta.enterprise.inject.Produces;
+import jakarta.inject.Singleton;
+import org.quartz.Scheduler;
+import org.quartz.SchedulerException;
+import org.quartz.impl.StdSchedulerFactory;
+
+/**
+ * Produces a custom {@link Scheduler} bean active only under the
+ * {@code quartz-custom-scheduler} build profile (used by
+ * {@link 
org.apache.camel.quarkus.component.quartz.it.QuartzQuarkusCustomSchedulerAutowiredTest}).
+ */
+public class CustomSchedulerProducer {
+
+    @Produces
+    @Singleton
+    @IfBuildProfile("quartz-custom-scheduler")
+    public Scheduler customScheduler() throws SchedulerException {
+        Properties props = new Properties();
+        props.setProperty("org.quartz.scheduler.instanceName", 
"customScheduler");
+        props.setProperty("org.quartz.threadPool.threadCount", "2");
+        return new StdSchedulerFactory(props).getScheduler();
+    }
+}
diff --git 
a/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzResource.java
 
b/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzResource.java
index 45f3b0b271..5b9ea0c4af 100644
--- 
a/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzResource.java
+++ 
b/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzResource.java
@@ -50,6 +50,14 @@ public class QuartzResource {
         return new QuartzComponent();
     }
 
+    @Path("/scheduler-name")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public String getSchedulerName() throws Exception {
+        QuartzComponent component = camelContext.getComponent("quartz", 
QuartzComponent.class);
+        return component.getScheduler().getSchedulerName();
+    }
+
     @Path("/getNameAndResult")
     @GET
     @Produces(MediaType.APPLICATION_JSON)
diff --git 
a/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzSchedulerBeanProfile.java
 
b/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzSchedulerBeanProfile.java
new file mode 100644
index 0000000000..4ba334c0f5
--- /dev/null
+++ 
b/integration-tests/quartz/src/main/java/org/apache/camel/quarkus/component/quartz/it/QuartzSchedulerBeanProfile.java
@@ -0,0 +1,68 @@
+/*
+ * 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.quartz.it;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import io.quarkus.arc.profile.IfBuildProfile;
+import io.quarkus.scheduler.Scheduled;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ * Beans active only under the {@code quartz-scheduler-bean} build profile,
+ * used by {@link 
org.apache.camel.quarkus.component.quartz.it.QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest}.
+ */
+@ApplicationScoped
+@IfBuildProfile("quartz-scheduler-bean")
+public class QuartzSchedulerBeanProfile {
+
+    static final CountDownLatch QUARKUS_LATCH = new CountDownLatch(1);
+    static final CountDownLatch CAMEL_LATCH = new CountDownLatch(1);
+
+    @Scheduled(every = "1s", concurrentExecution = 
Scheduled.ConcurrentExecution.SKIP)
+    void scheduledQuarkusJob() {
+        QUARKUS_LATCH.countDown();
+    }
+
+    @Singleton
+    @IfBuildProfile("quartz-scheduler-bean")
+    public static class Routes extends RouteBuilder {
+        @Override
+        public void configure() {
+            from("quartz://schedulerBeanCamelJob?cron=0/1+*+*+*+*+?")
+                    .process(exchange -> CAMEL_LATCH.countDown());
+        }
+    }
+
+    @Path("/quartz/scheduler-bean")
+    public static class Resource {
+        @GET
+        @Path("/fired")
+        @Produces(MediaType.TEXT_PLAIN)
+        public boolean fired() throws InterruptedException {
+            return QUARKUS_LATCH.await(10, TimeUnit.SECONDS)
+                    && CAMEL_LATCH.await(10, TimeUnit.SECONDS);
+        }
+    }
+}
diff --git 
a/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzNoQuarkusSchedulerAutowiredTest.java
 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzNoQuarkusSchedulerAutowiredTest.java
new file mode 100644
index 0000000000..df3bf7c900
--- /dev/null
+++ 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzNoQuarkusSchedulerAutowiredTest.java
@@ -0,0 +1,48 @@
+/*
+ * 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.quartz.it;
+
+import java.util.Map;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.quarkus.test.junit.QuarkusTestProfile;
+import io.quarkus.test.junit.TestProfile;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.startsWith;
+
+@QuarkusTest
+@TestProfile(QuartzNoQuarkusSchedulerAutowiredTest.Profile.class)
+class QuartzNoQuarkusSchedulerAutowiredTest {
+
+    @Test
+    void testQuarkusQuartzSchedulerNotAutowired() {
+        RestAssured.get("/quartz/scheduler-name")
+                .then()
+                .statusCode(200)
+                .body(startsWith("DefaultQuartzScheduler"));
+    }
+
+    public static class Profile implements QuarkusTestProfile {
+        @Override
+        public Map<String, String> getConfigOverrides() {
+            return Map.of(
+                    "camel.component.quartzFromProperties.propertiesFile", "");
+        }
+    }
+}
diff --git 
a/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzNotAutowiredTest.java
 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzNotAutowiredTest.java
new file mode 100644
index 0000000000..a3e9b9185d
--- /dev/null
+++ 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzNotAutowiredTest.java
@@ -0,0 +1,47 @@
+/*
+ * 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.quartz.it;
+
+import java.util.Map;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.quarkus.test.junit.QuarkusTestProfile;
+import io.quarkus.test.junit.TestProfile;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.startsWith;
+
+@QuarkusTest
+@TestProfile(QuartzNotAutowiredTest.Profile.class)
+class QuartzNotAutowiredTest {
+
+    @Test
+    void testQuarkusQuartzSchedulerNotAutowired() {
+        RestAssured.get("/quartz/scheduler-name")
+                .then()
+                .statusCode(200)
+                .body(startsWith("DefaultQuartzScheduler"));
+    }
+
+    public static class Profile implements QuarkusTestProfile {
+        @Override
+        public Map<String, String> getConfigOverrides() {
+            return Map.of("camel.component.quartz.autowired-enabled", "false");
+        }
+    }
+}
diff --git 
a/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusCustomSchedulerAutowiredTest.java
 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusCustomSchedulerAutowiredTest.java
new file mode 100644
index 0000000000..aab433d277
--- /dev/null
+++ 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusCustomSchedulerAutowiredTest.java
@@ -0,0 +1,52 @@
+/*
+ * 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.quartz.it;
+
+import java.util.Map;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.quarkus.test.junit.QuarkusTestProfile;
+import io.quarkus.test.junit.TestProfile;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.is;
+
+@QuarkusTest
+@TestProfile(QuartzQuarkusCustomSchedulerAutowiredTest.Profile.class)
+class QuartzQuarkusCustomSchedulerAutowiredTest {
+
+    @Test
+    void testCustomSchedulerAutowired() {
+        RestAssured.get("/quartz/scheduler-name")
+                .then()
+                .statusCode(200)
+                .body(is("customScheduler"));
+    }
+
+    public static class Profile implements QuarkusTestProfile {
+        @Override
+        public String getConfigProfile() {
+            return "quartz-custom-scheduler";
+        }
+
+        @Override
+        public Map<String, String> getConfigOverrides() {
+            return 
Map.of("camel.component.quartzFromProperties.propertiesFile", "");
+        }
+    }
+}
diff --git 
a/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusSchedulerAutowiredTest.java
 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusSchedulerAutowiredTest.java
new file mode 100644
index 0000000000..feee98df7e
--- /dev/null
+++ 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusSchedulerAutowiredTest.java
@@ -0,0 +1,47 @@
+/*
+ * 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.quartz.it;
+
+import java.util.Map;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.quarkus.test.junit.QuarkusTestProfile;
+import io.quarkus.test.junit.TestProfile;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.is;
+
+@QuarkusTest
+@TestProfile(QuartzQuarkusSchedulerAutowiredTest.Profile.class)
+class QuartzQuarkusSchedulerAutowiredTest {
+
+    @Test
+    void testQuarkusSchedulerAutowired() {
+        RestAssured.get("/quartz/scheduler-name")
+                .then()
+                .statusCode(200)
+                .body(is("QuarkusQuartzScheduler"));
+    }
+
+    public static class Profile implements QuarkusTestProfile {
+        @Override
+        public Map<String, String> getConfigOverrides() {
+            return Map.of("quarkus.scheduler.start-mode", "forced");
+        }
+    }
+}
diff --git 
a/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest.java
 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest.java
new file mode 100644
index 0000000000..3428b8fff5
--- /dev/null
+++ 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest.java
@@ -0,0 +1,57 @@
+/*
+ * 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.quartz.it;
+
+import java.util.Map;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.quarkus.test.junit.QuarkusTestProfile;
+import io.quarkus.test.junit.TestProfile;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.is;
+
+@QuarkusTest
+@TestProfile(QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest.Profile.class)
+class QuartzQuarkusSchedulerAutowiredWithSchedulerBeanTest {
+
+    @Test
+    void testQuarkusSchedulerAutowired() {
+        RestAssured.get("/quartz/scheduler-name")
+                .then()
+                .statusCode(200)
+                .body(is("QuarkusQuartzScheduler"));
+
+        RestAssured.get("/quartz/scheduler-bean/fired")
+                .then()
+                .statusCode(200)
+                .body(is("true"));
+    }
+
+    public static class Profile implements QuarkusTestProfile {
+        @Override
+        public String getConfigProfile() {
+            return "quartz-scheduler-bean";
+        }
+
+        @Override
+        public Map<String, String> getConfigOverrides() {
+            return 
Map.of("camel.component.quartzFromProperties.propertiesFile", "");
+        }
+    }
+}
diff --git 
a/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusSchedulerNotAutowiredTest.java
 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusSchedulerNotAutowiredTest.java
new file mode 100644
index 0000000000..e65a9a7a4c
--- /dev/null
+++ 
b/integration-tests/quartz/src/test/java/org/apache/camel/quarkus/component/quartz/it/QuartzQuarkusSchedulerNotAutowiredTest.java
@@ -0,0 +1,49 @@
+/*
+ * 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.quartz.it;
+
+import java.util.Map;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.quarkus.test.junit.QuarkusTestProfile;
+import io.quarkus.test.junit.TestProfile;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.Matchers.startsWith;
+
+@QuarkusTest
+@TestProfile(QuartzQuarkusSchedulerNotAutowiredTest.Profile.class)
+class QuartzQuarkusSchedulerNotAutowiredTest {
+
+    @Test
+    void testQuarkusQuartzSchedulerNotAutowired() {
+        RestAssured.get("/quartz/scheduler-name")
+                .then()
+                .statusCode(200)
+                .body(startsWith("DefaultQuartzScheduler"));
+    }
+
+    public static class Profile implements QuarkusTestProfile {
+        @Override
+        public Map<String, String> getConfigOverrides() {
+            return Map.of(
+                    "camel.component.quartz.autowired-enabled", "false",
+                    "quarkus.scheduler.start-mode", "forced");
+        }
+    }
+}


Reply via email to