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 fd46ff007e Tidy camel-quarkus-junit configuration classes
fd46ff007e is described below

commit fd46ff007e24621f1c6b9c82f52f87bcb3fa4fdb
Author: James Netherton <[email protected]>
AuthorDate: Tue Jun 2 13:12:22 2026 +0100

    Tidy camel-quarkus-junit configuration classes
---
 ....java => CamelQuarkusContextConfiguration.java} | 21 +++++++++++++-------
 ...=> CamelQuarkusTestExecutionConfiguration.java} | 16 ++++++++++-----
 .../quarkus/test/CamelQuarkusTestSupport.java      | 23 ++++++++++------------
 3 files changed, 35 insertions(+), 25 deletions(-)

diff --git 
a/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CustomCamelContextConfiguration.java
 
b/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusContextConfiguration.java
similarity index 51%
rename from 
test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CustomCamelContextConfiguration.java
rename to 
test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusContextConfiguration.java
index 8424238f75..edc2139302 100644
--- 
a/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CustomCamelContextConfiguration.java
+++ 
b/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusContextConfiguration.java
@@ -18,17 +18,24 @@ package org.apache.camel.quarkus.test;
 
 import org.apache.camel.test.junit6.CamelContextConfiguration;
 
-public final class CustomCamelContextConfiguration extends 
CamelContextConfiguration {
+/**
+ * Exposes protected methods from {@link CamelContextConfiguration} for use 
within
+ * the {@code org.apache.camel.quarkus.test} package.
+ */
+final class CamelQuarkusContextConfiguration extends CamelContextConfiguration 
{
 
-    CustomCamelContextConfiguration 
withCustomCamelContextSupplier(CamelContextSupplier camelContextSupplier) {
-        return (CustomCamelContextConfiguration) 
super.withCamelContextSupplier(camelContextSupplier);
+    @Override
+    public CamelQuarkusContextConfiguration 
withCamelContextSupplier(CamelContextSupplier camelContextSupplier) {
+        return (CamelQuarkusContextConfiguration) 
super.withCamelContextSupplier(camelContextSupplier);
     }
 
-    CustomCamelContextConfiguration withCustomPostProcessor(PostProcessor 
postProcessor) {
-        return (CustomCamelContextConfiguration) 
super.withPostProcessor(postProcessor);
+    @Override
+    protected CamelQuarkusContextConfiguration withPostProcessor(PostProcessor 
postProcessor) {
+        return (CamelQuarkusContextConfiguration) 
super.withPostProcessor(postProcessor);
     }
 
-    CustomCamelContextConfiguration withCustomRoutesSupplier(RoutesSupplier 
routesSupplier) {
-        return (CustomCamelContextConfiguration) 
super.withRoutesSupplier(routesSupplier);
+    @Override
+    protected CamelQuarkusContextConfiguration 
withRoutesSupplier(RoutesSupplier routesSupplier) {
+        return (CamelQuarkusContextConfiguration) 
super.withRoutesSupplier(routesSupplier);
     }
 }
diff --git 
a/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CustomTestExecutionConfiguration.java
 
b/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusTestExecutionConfiguration.java
similarity index 57%
rename from 
test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CustomTestExecutionConfiguration.java
rename to 
test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusTestExecutionConfiguration.java
index 2df8b12777..2a068fd965 100644
--- 
a/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CustomTestExecutionConfiguration.java
+++ 
b/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusTestExecutionConfiguration.java
@@ -18,13 +18,19 @@ package org.apache.camel.quarkus.test;
 
 import org.apache.camel.test.junit6.TestExecutionConfiguration;
 
-public final class CustomTestExecutionConfiguration extends 
TestExecutionConfiguration {
+/**
+ * Exposes protected methods from {@link TestExecutionConfiguration} for use 
within
+ * the {@code org.apache.camel.quarkus.test} package.
+ */
+final class CamelQuarkusTestExecutionConfiguration extends 
TestExecutionConfiguration {
 
-    CustomTestExecutionConfiguration withCustomUseAdviceWith(boolean 
useAdviceWith) {
-        return (CustomTestExecutionConfiguration) 
super.withUseAdviceWith(useAdviceWith);
+    @Override
+    public CamelQuarkusTestExecutionConfiguration withUseAdviceWith(boolean 
useAdviceWith) {
+        return (CamelQuarkusTestExecutionConfiguration) 
super.withUseAdviceWith(useAdviceWith);
     }
 
-    CustomTestExecutionConfiguration 
withCustomCreateCamelContextPerClass(boolean createCamelContextPerClass) {
-        return (CustomTestExecutionConfiguration) 
super.withCreateCamelContextPerClass(createCamelContextPerClass);
+    @Override
+    protected CamelQuarkusTestExecutionConfiguration 
withCreateCamelContextPerClass(boolean createCamelContextPerClass) {
+        return (CamelQuarkusTestExecutionConfiguration) 
super.withCreateCamelContextPerClass(createCamelContextPerClass);
     }
 }
diff --git 
a/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusTestSupport.java
 
b/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusTestSupport.java
index 7a269ae6ef..7bee0ed4df 100644
--- 
a/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusTestSupport.java
+++ 
b/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusTestSupport.java
@@ -104,9 +104,6 @@ public class CamelQuarkusTestSupport extends 
AbstractTestSupport
 
     private static final Logger LOG = 
LoggerFactory.getLogger(CamelQuarkusTestSupport.class);
 
-    //    @RegisterExtension
-    //    protected CamelTestSupport camelTestSupportExtension = this;
-
     private final StopWatch watch = new StopWatch();
     private String currentTestName;
 
@@ -120,21 +117,21 @@ public class CamelQuarkusTestSupport extends 
AbstractTestSupport
     private Set<String> existingComponents;
 
     public CamelQuarkusTestSupport() {
-        super(new CustomTestExecutionConfiguration(), new 
CustomCamelContextConfiguration());
+        super(new CamelQuarkusTestExecutionConfiguration(), new 
CamelQuarkusContextConfiguration());
 
         this.contextManagerFactory = new ContextNotStoppingManagerFactory();
 
         testConfigurationBuilder()
-                .withCustomUseAdviceWith(isUseAdviceWith())
+                .withUseAdviceWith(isUseAdviceWith())
                 .withJMX(useJmx())
                 .withUseRouteBuilder(isUseRouteBuilder())
                 .withDumpRouteCoverage(isDumpRouteCoverage())
                 .withAutoStartContext(false);
 
         contextConfiguration()
-                .withCustomCamelContextSupplier(this::camelContextSupplier)
-                .withCustomPostProcessor(this::postProcessTest)
-                .withCustomRoutesSupplier(this::createRouteBuilders)
+                .withCamelContextSupplier(this::camelContextSupplier)
+                .withPostProcessor(this::postProcessTest)
+                .withRoutesSupplier(this::createRouteBuilders)
                 .withRegistryBinder(this::bindToRegistry)
                 
.withUseOverridePropertiesWithPropertiesComponent(useOverridePropertiesWithPropertiesComponent())
                 .withRouteFilterExcludePattern(getRouteFilterExcludePattern())
@@ -149,12 +146,12 @@ public class CamelQuarkusTestSupport extends 
AbstractTestSupport
         testConfiguration().withAutoStartContext(false);
     }
 
-    CustomCamelContextConfiguration contextConfiguration() {
-        return (CustomCamelContextConfiguration) camelContextConfiguration;
+    CamelQuarkusContextConfiguration contextConfiguration() {
+        return (CamelQuarkusContextConfiguration) camelContextConfiguration;
     }
 
-    CustomTestExecutionConfiguration testConfigurationBuilder() {
-        return (CustomTestExecutionConfiguration) testConfigurationBuilder;
+    CamelQuarkusTestExecutionConfiguration testConfigurationBuilder() {
+        return (CamelQuarkusTestExecutionConfiguration) 
testConfigurationBuilder;
     }
 
     //------------------------ quarkus callbacks ---------------
@@ -359,7 +356,7 @@ public class CamelQuarkusTestSupport extends 
AbstractTestSupport
                 .filter(lc -> 
lc.equals(TestInstance.Lifecycle.PER_CLASS)).isPresent();
         if (perClassPresent) {
             LOG.trace("Creating a legacy context manager for {}", 
context.getDisplayName());
-            
testConfigurationBuilder().withCustomCreateCamelContextPerClass(perClassPresent);
+            
testConfigurationBuilder().withCreateCamelContextPerClass(perClassPresent);
             contextManager = 
contextManagerFactory.createContextManager(ContextManagerFactory.Type.BEFORE_ALL,
                     testConfigurationBuilder, camelContextConfiguration);
         }

Reply via email to