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
commit 4fa40046ae62829b58fc47f97630618df3b8bb63 Author: James Netherton <[email protected]> AuthorDate: Thu Jul 31 08:56:08 2025 +0100 Simplify testing of MainListener --- catalog/pom.xml | 13 ---- .../core/deployment/CamelRoutesCollectorTest.java | 1 - .../CamelMainListenerTest.java} | 28 ++++---- .../core/deployment/main}/CustomMainListener.java | 29 ++++----- .../custom-main-listener/deployment/pom.xml | 74 ---------------------- .../deployment/CustomMainListenerFeature.java | 29 --------- .../deployment/CustomMainListenerProcessor.java | 31 --------- .../custom-main-listener/pom.xml | 39 ------------ .../custom-main-listener/runtime/pom.xml | 72 --------------------- .../mainlistener/CustomMainListenerRecorder.java | 28 -------- integration-tests-support/pom.xml | 1 - integration-tests/main/pom.xml | 17 ----- .../camel/quarkus/main/CoreMainResource.java | 3 - .../apache/camel/quarkus/main/CoreMainTest.java | 5 +- poms/bom-test/pom.xml | 5 -- 15 files changed, 29 insertions(+), 346 deletions(-) diff --git a/catalog/pom.xml b/catalog/pom.xml index ac6ef8dadf..a5bc66e4d7 100644 --- a/catalog/pom.xml +++ b/catalog/pom.xml @@ -1852,19 +1852,6 @@ </exclusion> </exclusions> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-tests-support-custom-main-listener</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-integration-tests-support-custom-type-converter</artifactId> diff --git a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelRoutesCollectorTest.java b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelRoutesCollectorTest.java index d75d75c360..4880b680a2 100644 --- a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelRoutesCollectorTest.java +++ b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelRoutesCollectorTest.java @@ -26,7 +26,6 @@ import io.quarkus.deployment.recording.BytecodeRecorderImpl; import io.quarkus.runtime.RuntimeValue; import io.quarkus.test.QuarkusUnitTest; import jakarta.inject.Inject; -import org.apache.camel.main.Main; import org.apache.camel.main.RoutesCollector; import org.apache.camel.quarkus.core.deployment.main.spi.CamelRoutesCollectorBuildItem; import org.apache.camel.quarkus.main.CamelMain; diff --git a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelRoutesCollectorTest.java b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/main/CamelMainListenerTest.java similarity index 71% copy from extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelRoutesCollectorTest.java copy to extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/main/CamelMainListenerTest.java index d75d75c360..e7817db641 100644 --- a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/CamelRoutesCollectorTest.java +++ b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/main/CamelMainListenerTest.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.deployment; +package org.apache.camel.quarkus.core.deployment.main; import java.util.function.Consumer; @@ -26,29 +26,32 @@ import io.quarkus.deployment.recording.BytecodeRecorderImpl; import io.quarkus.runtime.RuntimeValue; import io.quarkus.test.QuarkusUnitTest; import jakarta.inject.Inject; -import org.apache.camel.main.Main; -import org.apache.camel.main.RoutesCollector; -import org.apache.camel.quarkus.core.deployment.main.spi.CamelRoutesCollectorBuildItem; +import org.apache.camel.main.MainListener; +import org.apache.camel.quarkus.core.deployment.main.spi.CamelMainListenerBuildItem; import org.apache.camel.quarkus.main.CamelMain; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -class CamelRoutesCollectorTest { +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class CamelMainListenerTest { @RegisterExtension static final QuarkusUnitTest CONFIG = new QuarkusUnitTest() .addBuildChainCustomizer(buildCustomizer()) .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) - .addClasses(CustomRoutesCollector.class)); + .addClasses(CustomMainListener.class)); @Inject CamelMain main; @Test - void customRoutesCollector() { - Assertions.assertInstanceOf(CustomRoutesCollector.class, main.getRoutesCollector()); + void customMainListener() { + assertEquals(2, main.getCamelContext().getRoutes().size()); + assertEquals(2, main.getMainListeners().size()); + assertTrue(main.getMainListeners().stream().anyMatch(listener -> listener instanceof CustomMainListener)); } static Consumer<BuildChainBuilder> buildCustomizer() { @@ -61,13 +64,12 @@ class CamelRoutesCollectorTest { String methodName = "execute"; BytecodeRecorderImpl bri = new BytecodeRecorderImpl(true, getClass().getSimpleName(), methodName, Integer.toString(methodName.hashCode()), true, s -> null); - RuntimeValue<RoutesCollector> value = bri.newInstance(CustomRoutesCollector.class.getName()); - context.produce(new CamelRoutesCollectorBuildItem(value)); + RuntimeValue<MainListener> value = bri.newInstance(CustomMainListener.class.getName()); + context.produce(new CamelMainListenerBuildItem(value)); context.produce(new StaticBytecodeRecorderBuildItem(bri)); } - }).produces(CamelRoutesCollectorBuildItem.class).produces(StaticBytecodeRecorderBuildItem.class).build(); + }).produces(CamelMainListenerBuildItem.class).produces(StaticBytecodeRecorderBuildItem.class).build(); } }; } - } diff --git a/integration-tests-support/custom-main-listener/runtime/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/CustomMainListener.java b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/main/CustomMainListener.java similarity index 76% rename from integration-tests-support/custom-main-listener/runtime/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/CustomMainListener.java rename to extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/main/CustomMainListener.java index 6c06003c9f..850daa5ed4 100644 --- a/integration-tests-support/custom-main-listener/runtime/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/CustomMainListener.java +++ b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/main/CustomMainListener.java @@ -14,35 +14,32 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.it.support.mainlistener; +package org.apache.camel.quarkus.core.deployment.main; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.main.BaseMainSupport; import org.apache.camel.main.MainListener; -public class CustomMainListener implements MainListener { +public final class CustomMainListener implements MainListener { + @Override public void beforeInitialize(BaseMainSupport main) { - try { - main.configure().addRoutesBuilder(new RouteBuilder() { - @Override - public void configure() throws Exception { - from("timer:configure") - .id("configure") - .to("log:configure"); - } - }); - } catch (Exception e) { - throw new RuntimeException(e); - } + main.configure().addRoutesBuilder(new RouteBuilder() { + @Override + public void configure() { + from("timer:configure") + .id("configure") + .to("log:configure"); + } + }); } @Override - public void afterConfigure(BaseMainSupport main) { + public void beforeConfigure(BaseMainSupport main) { } @Override - public void beforeConfigure(BaseMainSupport main) { + public void afterConfigure(BaseMainSupport main) { } @Override diff --git a/integration-tests-support/custom-main-listener/deployment/pom.xml b/integration-tests-support/custom-main-listener/deployment/pom.xml deleted file mode 100644 index e4cb0c9b7b..0000000000 --- a/integration-tests-support/custom-main-listener/deployment/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - 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. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-tests-support-custom-main-listener-parent</artifactId> - <version>3.26.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - - <artifactId>camel-quarkus-integration-tests-support-custom-main-listener-deployment</artifactId> - <name>Camel Quarkus :: Integration Tests :: Support :: Custom Main Listener :: Deployment</name> - <description>A test extension</description> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-bom-test</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-core-deployment</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-tests-support-custom-main-listener</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <annotationProcessorPaths> - <path> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-extension-processor</artifactId> - <version>${quarkus.version}</version> - </path> - </annotationProcessorPaths> - </configuration> - </plugin> - </plugins> - </build> - -</project> diff --git a/integration-tests-support/custom-main-listener/deployment/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/deployment/CustomMainListenerFeature.java b/integration-tests-support/custom-main-listener/deployment/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/deployment/CustomMainListenerFeature.java deleted file mode 100644 index 028b8b0b4c..0000000000 --- a/integration-tests-support/custom-main-listener/deployment/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/deployment/CustomMainListenerFeature.java +++ /dev/null @@ -1,29 +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.it.support.mainlistener.deployment; - -import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.builditem.FeatureBuildItem; - -public class CustomMainListenerFeature { - private static final String FEATURE = "camel-main-listener-support"; - - @BuildStep - FeatureBuildItem feature() { - return new FeatureBuildItem(FEATURE); - } -} diff --git a/integration-tests-support/custom-main-listener/deployment/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/deployment/CustomMainListenerProcessor.java b/integration-tests-support/custom-main-listener/deployment/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/deployment/CustomMainListenerProcessor.java deleted file mode 100644 index 2ddee21e2d..0000000000 --- a/integration-tests-support/custom-main-listener/deployment/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/deployment/CustomMainListenerProcessor.java +++ /dev/null @@ -1,31 +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.it.support.mainlistener.deployment; - -import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.annotations.ExecutionTime; -import io.quarkus.deployment.annotations.Record; -import org.apache.camel.quarkus.core.deployment.main.spi.CamelMainListenerBuildItem; -import org.apache.camel.quarkus.it.support.mainlistener.CustomMainListenerRecorder; - -public class CustomMainListenerProcessor { - @Record(ExecutionTime.STATIC_INIT) - @BuildStep - CamelMainListenerBuildItem listener(CustomMainListenerRecorder recorder) { - return new CamelMainListenerBuildItem(recorder.createSupportListener()); - } -} diff --git a/integration-tests-support/custom-main-listener/pom.xml b/integration-tests-support/custom-main-listener/pom.xml deleted file mode 100644 index 3f1a02fa2e..0000000000 --- a/integration-tests-support/custom-main-listener/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - 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. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <version>3.26.0-SNAPSHOT</version> - <artifactId>camel-quarkus-integration-tests-support</artifactId> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>camel-quarkus-integration-tests-support-custom-main-listener-parent</artifactId> - <packaging>pom</packaging> - - <name>Camel Quarkus :: Integration Tests :: Support :: Custom Main Listener</name> - - <modules> - <module>runtime</module> - <module>deployment</module> - </modules> - -</project> diff --git a/integration-tests-support/custom-main-listener/runtime/pom.xml b/integration-tests-support/custom-main-listener/runtime/pom.xml deleted file mode 100644 index 20c47338a4..0000000000 --- a/integration-tests-support/custom-main-listener/runtime/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - 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. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-tests-support-custom-main-listener-parent</artifactId> - <version>3.26.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - - <artifactId>camel-quarkus-integration-tests-support-custom-main-listener</artifactId> - <name>Camel Quarkus :: Integration Tests :: Support :: Custom Main Listener :: Runtime</name> - <description>A test extension</description> - - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-core</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.jboss.jandex</groupId> - <artifactId>jandex-maven-plugin</artifactId> - <executions> - <execution> - <id>make-index</id> - <goals> - <goal>jandex</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-extension-maven-plugin</artifactId> - </plugin> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <annotationProcessorPaths> - <path> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-extension-processor</artifactId> - <version>${quarkus.version}</version> - </path> - </annotationProcessorPaths> - </configuration> - </plugin> - </plugins> - </build> -</project> diff --git a/integration-tests-support/custom-main-listener/runtime/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/CustomMainListenerRecorder.java b/integration-tests-support/custom-main-listener/runtime/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/CustomMainListenerRecorder.java deleted file mode 100644 index debf9c2280..0000000000 --- a/integration-tests-support/custom-main-listener/runtime/src/main/java/org/apache/camel/quarkus/it/support/mainlistener/CustomMainListenerRecorder.java +++ /dev/null @@ -1,28 +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.it.support.mainlistener; - -import io.quarkus.runtime.RuntimeValue; -import io.quarkus.runtime.annotations.Recorder; -import org.apache.camel.main.MainListener; - -@Recorder -public class CustomMainListenerRecorder { - public RuntimeValue<MainListener> createSupportListener() { - return new RuntimeValue<>(new CustomMainListener()); - } -} diff --git a/integration-tests-support/pom.xml b/integration-tests-support/pom.xml index a54fb1e280..5c9bdd7380 100644 --- a/integration-tests-support/pom.xml +++ b/integration-tests-support/pom.xml @@ -53,7 +53,6 @@ <module>certificate-generator</module> <module>custom-dataformat</module> <module>custom-type-converter</module> - <module>custom-main-listener</module> <module>custom-kamelet-resource</module> <module>debezium</module> <module>google</module> diff --git a/integration-tests/main/pom.xml b/integration-tests/main/pom.xml index 155447ecf7..43801ade69 100644 --- a/integration-tests/main/pom.xml +++ b/integration-tests/main/pom.xml @@ -55,10 +55,6 @@ <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-integration-tests-support-custom-type-converter</artifactId> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-tests-support-custom-main-listener</artifactId> - </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-integration-test-support-custom-dataformat</artifactId> @@ -184,19 +180,6 @@ </exclusion> </exclusions> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-tests-support-custom-main-listener-deployment</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>*</groupId> - <artifactId>*</artifactId> - </exclusion> - </exclusions> - </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-integration-tests-support-custom-type-converter-deployment</artifactId> diff --git a/integration-tests/main/src/main/java/org/apache/camel/quarkus/main/CoreMainResource.java b/integration-tests/main/src/main/java/org/apache/camel/quarkus/main/CoreMainResource.java index b885520593..3c9eb0c381 100644 --- a/integration-tests/main/src/main/java/org/apache/camel/quarkus/main/CoreMainResource.java +++ b/integration-tests/main/src/main/java/org/apache/camel/quarkus/main/CoreMainResource.java @@ -109,8 +109,6 @@ public class CoreMainResource { @Produces(MediaType.APPLICATION_JSON) public JsonObject describeMain() { CamelContext camelContext = main.getCamelContext(); - JsonArrayBuilder listeners = Json.createArrayBuilder(); - main.getMainListeners().forEach(listener -> listeners.add(listener.getClass().getName())); JsonArrayBuilder routeBuilders = Json.createArrayBuilder(); main.configure().getRoutesBuilders().forEach(builder -> routeBuilders.add(builder.getClass().getName())); @@ -148,7 +146,6 @@ public class CoreMainResource { return Json.createObjectBuilder() .add("xml-model-dumper", PluginHelper.getModelToXMLDumper(camelContext).getClass().getName()) .add("routes-collector", collector) - .add("listeners", listeners) .add("routeBuilders", routeBuilders) .add("routes", routes) .add("lru-cache-factory", LRUCacheFactory.getInstance().getClass().getName()) diff --git a/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTest.java b/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTest.java index 125726ed7e..29f75e1a28 100644 --- a/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTest.java +++ b/integration-tests/main/src/test/java/org/apache/camel/quarkus/main/CoreMainTest.java @@ -28,7 +28,6 @@ import jakarta.ws.rs.core.MediaType; import org.apache.camel.ServiceStatus; import org.apache.camel.quarkus.core.DisabledModelToXMLDumper; import org.apache.camel.quarkus.core.RegistryRoutesLoaders; -import org.apache.camel.quarkus.it.support.mainlistener.CustomMainListener; import org.apache.camel.reactive.vertx.VertXReactiveExecutor; import org.apache.camel.reactive.vertx.VertXThreadPoolFactory; import org.apache.camel.support.DefaultLRUCacheFactory; @@ -82,13 +81,11 @@ public class CoreMainTest { assertThat(p.getString("routes-collector.type")).isEqualTo(CamelMainRoutesCollector.class.getName()); assertThat(p.getString("routes-collector.type-registry")).isEqualTo(RegistryRoutesLoaders.Default.class.getName()); - assertThat(p.getList("listeners", String.class)) - .containsAnyOf(CamelMainEventBridge.class.getName(), CustomMainListener.class.getName()); assertThat(p.getList("routeBuilders", String.class)) .contains(CamelRoute.class.getName()) .doesNotContain(CamelRouteFiltered.class.getName()); assertThat(p.getList("routes", String.class)) - .contains("keep-alive", "configure", "beforeStart", "produced", "endpointdsl", "lambdaEndpointRoute") + .contains("keep-alive", "produced", "endpointdsl", "lambdaEndpointRoute") .doesNotContain("filtered"); assertThat(p.getString("lru-cache-factory")).isEqualTo(DefaultLRUCacheFactory.class.getName()); diff --git a/poms/bom-test/pom.xml b/poms/bom-test/pom.xml index 05929456d9..5e14d6b322 100644 --- a/poms/bom-test/pom.xml +++ b/poms/bom-test/pom.xml @@ -164,11 +164,6 @@ <artifactId>camel-quarkus-integration-tests-support-kafka</artifactId> <version>${camel-quarkus.version}</version> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-tests-support-custom-main-listener</artifactId> - <version>${camel-quarkus.version}</version> - </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-integration-tests-support-custom-type-converter</artifactId>
