This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/camel-main by this push:
new 0b9943435b Fix test-framework compilation
0b9943435b is described below
commit 0b9943435bccd79377fa51957afacece088cb638
Author: James Netherton <[email protected]>
AuthorDate: Wed Jun 10 15:41:52 2026 +0100
Fix test-framework compilation
---
.../test/CamelQuarkusContextConfiguration.java | 41 ----------------------
.../CamelQuarkusTestExecutionConfiguration.java | 36 -------------------
.../quarkus/test/CamelQuarkusTestSupport.java | 19 ++++------
3 files changed, 6 insertions(+), 90 deletions(-)
diff --git
a/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusContextConfiguration.java
b/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusContextConfiguration.java
deleted file mode 100644
index edc2139302..0000000000
---
a/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusContextConfiguration.java
+++ /dev/null
@@ -1,41 +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.test;
-
-import org.apache.camel.test.junit6.CamelContextConfiguration;
-
-/**
- * Exposes protected methods from {@link CamelContextConfiguration} for use
within
- * the {@code org.apache.camel.quarkus.test} package.
- */
-final class CamelQuarkusContextConfiguration extends CamelContextConfiguration
{
-
- @Override
- public CamelQuarkusContextConfiguration
withCamelContextSupplier(CamelContextSupplier camelContextSupplier) {
- return (CamelQuarkusContextConfiguration)
super.withCamelContextSupplier(camelContextSupplier);
- }
-
- @Override
- protected CamelQuarkusContextConfiguration withPostProcessor(PostProcessor
postProcessor) {
- return (CamelQuarkusContextConfiguration)
super.withPostProcessor(postProcessor);
- }
-
- @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/CamelQuarkusTestExecutionConfiguration.java
b/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusTestExecutionConfiguration.java
deleted file mode 100644
index 2a068fd965..0000000000
---
a/test-framework/camel-quarkus-junit/src/main/java/org/apache/camel/quarkus/test/CamelQuarkusTestExecutionConfiguration.java
+++ /dev/null
@@ -1,36 +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.test;
-
-import org.apache.camel.test.junit6.TestExecutionConfiguration;
-
-/**
- * Exposes protected methods from {@link TestExecutionConfiguration} for use
within
- * the {@code org.apache.camel.quarkus.test} package.
- */
-final class CamelQuarkusTestExecutionConfiguration extends
TestExecutionConfiguration {
-
- @Override
- public CamelQuarkusTestExecutionConfiguration withUseAdviceWith(boolean
useAdviceWith) {
- return (CamelQuarkusTestExecutionConfiguration)
super.withUseAdviceWith(useAdviceWith);
- }
-
- @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 7bee0ed4df..006b975c0b 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
@@ -117,18 +117,19 @@ public class CamelQuarkusTestSupport extends
AbstractTestSupport
private Set<String> existingComponents;
public CamelQuarkusTestSupport() {
- super(new CamelQuarkusTestExecutionConfiguration(), new
CamelQuarkusContextConfiguration());
+ super(new TestExecutionConfiguration(), new
CamelContextConfiguration());
this.contextManagerFactory = new ContextNotStoppingManagerFactory();
- testConfigurationBuilder()
+ testConfigurationBuilder
.withUseAdviceWith(isUseAdviceWith())
.withJMX(useJmx())
.withUseRouteBuilder(isUseRouteBuilder())
.withDumpRouteCoverage(isDumpRouteCoverage())
- .withAutoStartContext(false);
+ .withAutoStartContext(false)
+ .withCreateCamelContextPerClass(false);
- contextConfiguration()
+ camelContextConfiguration
.withCamelContextSupplier(this::camelContextSupplier)
.withPostProcessor(this::postProcessTest)
.withRoutesSupplier(this::createRouteBuilders)
@@ -146,14 +147,6 @@ public class CamelQuarkusTestSupport extends
AbstractTestSupport
testConfiguration().withAutoStartContext(false);
}
- CamelQuarkusContextConfiguration contextConfiguration() {
- return (CamelQuarkusContextConfiguration) camelContextConfiguration;
- }
-
- CamelQuarkusTestExecutionConfiguration testConfigurationBuilder() {
- return (CamelQuarkusTestExecutionConfiguration)
testConfigurationBuilder;
- }
-
//------------------------ quarkus callbacks ---------------
/**
@@ -356,7 +349,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().withCreateCamelContextPerClass(perClassPresent);
+
testConfigurationBuilder.withCreateCamelContextPerClass(perClassPresent);
contextManager =
contextManagerFactory.createContextManager(ContextManagerFactory.Type.BEFORE_ALL,
testConfigurationBuilder, camelContextConfiguration);
}