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 2215f5b371 Rationalize master extension integration testing
2215f5b371 is described below

commit 2215f5b371a369736c067842cb6ec7cf0d6370ab
Author: James Netherton <[email protected]>
AuthorDate: Tue Jan 13 10:53:38 2026 +0000

    Rationalize master extension integration testing
    
    Fixes #8114
---
 integration-tests/master/pom.xml                   | 232 ---------------------
 .../component/master/it/MasterResource.java        |  35 ----
 .../quarkus/component/master/it/MasterRoutes.java  |  48 -----
 .../src/main/resources/application.properties      |  18 --
 .../quarkus/component/master/it/MasterIT.java      |  24 ---
 .../quarkus/component/master/it/MasterTest.java    | 107 ----------
 integration-tests/pom.xml                          |   1 -
 tooling/scripts/test-categories.yaml               |   1 -
 tooling/test-list/pom.xml                          |   1 -
 9 files changed, 467 deletions(-)

diff --git a/integration-tests/master/pom.xml b/integration-tests/master/pom.xml
deleted file mode 100644
index 2422164f41..0000000000
--- a/integration-tests/master/pom.xml
+++ /dev/null
@@ -1,232 +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>
-        <artifactId>camel-quarkus-build-parent-it</artifactId>
-        <version>3.31.0-SNAPSHOT</version>
-        <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
-    </parent>
-
-    <artifactId>camel-quarkus-integration-test-master</artifactId>
-    <name>Camel Quarkus :: Integration Tests :: Master</name>
-    <description>Integration tests for Camel Quarkus Master 
extension</description>
-
-    <properties>
-        
<quarkus.runner>${project.build.directory}/quarkus-app/quarkus-run.jar</quarkus.runner>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-file</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-log</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-master</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-microprofile-health</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-timer</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-resteasy</artifactId>
-        </dependency>
-
-        <!-- test dependencies -->
-        <dependency>
-            <groupId>io.quarkus</groupId>
-            <artifactId>quarkus-junit5</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>io.rest-assured</groupId>
-            <artifactId>rest-assured</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel.quarkus</groupId>
-            
<artifactId>camel-quarkus-integration-tests-process-executor-support</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.awaitility</groupId>
-            <artifactId>awaitility</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <profiles>
-
-        <profile>
-            <id>full</id>
-            <activation>
-                <property>
-                    <name>!quickly</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <!-- Move surefire:test to integration-test phase to 
be able to run
-                             java -jar target/*runner.jar from a test -->
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-surefire-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>default-test</id>
-                                <goals>
-                                    <goal>test</goal>
-                                </goals>
-                                <phase>integration-test</phase>
-                                <configuration>
-                                    <systemPropertyVariables>
-                                        
<quarkus.runner>${quarkus.runner}</quarkus.runner>
-                                    </systemPropertyVariables>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-        <profile>
-            <id>native</id>
-            <activation>
-                <property>
-                    <name>native</name>
-                </property>
-            </activation>
-            <properties>
-                <quarkus.native.enabled>true</quarkus.native.enabled>
-                
<quarkus.runner>${project.build.directory}/${project.artifactId}-${project.version}-runner</quarkus.runner>
-            </properties>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-failsafe-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <goals>
-                                    <goal>integration-test</goal>
-                                    <goal>verify</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                        <configuration>
-                            <systemPropertyVariables>
-                                
<quarkus.runner>${quarkus.runner}</quarkus.runner>
-                            </systemPropertyVariables>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        <profile>
-            <id>virtualDependencies</id>
-            <activation>
-                <property>
-                    <name>!noVirtualDependencies</name>
-                </property>
-            </activation>
-            <dependencies>
-                <!-- The following dependencies guarantee that this module is 
built after them. You can update them by running `mvn process-resources 
-Pformat -N` from the source tree root directory -->
-                <dependency>
-                    <groupId>org.apache.camel.quarkus</groupId>
-                    <artifactId>camel-quarkus-file-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-log-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-master-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-microprofile-health-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-timer-deployment</artifactId>
-                    <version>${project.version}</version>
-                    <type>pom</type>
-                    <scope>test</scope>
-                    <exclusions>
-                        <exclusion>
-                            <groupId>*</groupId>
-                            <artifactId>*</artifactId>
-                        </exclusion>
-                    </exclusions>
-                </dependency>
-            </dependencies>
-        </profile>
-    </profiles>
-
-</project>
diff --git 
a/integration-tests/master/src/main/java/org/apache/camel/quarkus/component/master/it/MasterResource.java
 
b/integration-tests/master/src/main/java/org/apache/camel/quarkus/component/master/it/MasterResource.java
deleted file mode 100644
index 8d3c703fbb..0000000000
--- 
a/integration-tests/master/src/main/java/org/apache/camel/quarkus/component/master/it/MasterResource.java
+++ /dev/null
@@ -1,35 +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.master.it;
-
-import jakarta.inject.Inject;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.Path;
-import org.apache.camel.CamelContext;
-
-@Path("/master")
-public class MasterResource {
-
-    @Inject
-    CamelContext camelContext;
-
-    @Path("/camel/stop/leader")
-    @GET
-    public void stopLeaderRoute() throws Exception {
-        camelContext.getRouteController().stopRoute("leader");
-    }
-}
diff --git 
a/integration-tests/master/src/main/java/org/apache/camel/quarkus/component/master/it/MasterRoutes.java
 
b/integration-tests/master/src/main/java/org/apache/camel/quarkus/component/master/it/MasterRoutes.java
deleted file mode 100644
index 425d2cd9e9..0000000000
--- 
a/integration-tests/master/src/main/java/org/apache/camel/quarkus/component/master/it/MasterRoutes.java
+++ /dev/null
@@ -1,48 +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.master.it;
-
-import java.util.concurrent.TimeUnit;
-
-import jakarta.enterprise.context.ApplicationScoped;
-import org.apache.camel.Exchange;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.file.cluster.FileLockClusterService;
-import org.eclipse.microprofile.config.inject.ConfigProperty;
-
-@ApplicationScoped
-public class MasterRoutes extends RouteBuilder {
-
-    @ConfigProperty(name = "application.id")
-    String applicationId;
-
-    @Override
-    public void configure() throws Exception {
-        FileLockClusterService service = new FileLockClusterService();
-        service.setRoot("target/cluster");
-        service.setAcquireLockDelay(1, TimeUnit.SECONDS);
-        service.setAcquireLockInterval(1, TimeUnit.SECONDS);
-        getContext().addService(service);
-
-        // Output the id of the application into a file
-        from("master:ns:timer:test?period=100").id("leader")
-                .setBody(constant("leader"))
-                .setHeader(Exchange.FILE_NAME, 
constant(String.format("%s.txt", applicationId)))
-                .log(String.format("Application %s is writing into file", 
applicationId))
-                .to("file:target/cluster/");
-    }
-}
diff --git a/integration-tests/master/src/main/resources/application.properties 
b/integration-tests/master/src/main/resources/application.properties
deleted file mode 100644
index 0054a293a2..0000000000
--- a/integration-tests/master/src/main/resources/application.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.
-## ---------------------------------------------------------------------------
-
-application.id = leader
diff --git 
a/integration-tests/master/src/test/java/org/apache/camel/quarkus/component/master/it/MasterIT.java
 
b/integration-tests/master/src/test/java/org/apache/camel/quarkus/component/master/it/MasterIT.java
deleted file mode 100644
index 261cd8a06a..0000000000
--- 
a/integration-tests/master/src/test/java/org/apache/camel/quarkus/component/master/it/MasterIT.java
+++ /dev/null
@@ -1,24 +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.master.it;
-
-import io.quarkus.test.junit.QuarkusIntegrationTest;
-
-@QuarkusIntegrationTest
-class MasterIT extends MasterTest {
-
-}
diff --git 
a/integration-tests/master/src/test/java/org/apache/camel/quarkus/component/master/it/MasterTest.java
 
b/integration-tests/master/src/test/java/org/apache/camel/quarkus/component/master/it/MasterTest.java
deleted file mode 100644
index 8af3197614..0000000000
--- 
a/integration-tests/master/src/test/java/org/apache/camel/quarkus/component/master/it/MasterTest.java
+++ /dev/null
@@ -1,107 +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.master.it;
-
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.concurrent.TimeUnit;
-
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
-import org.apache.camel.quarkus.test.support.process.QuarkusProcessExecutor;
-import org.apache.commons.io.FileUtils;
-import org.awaitility.Awaitility;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-import org.zeroturnaround.exec.StartedProcess;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.emptyString;
-
-@QuarkusTest
-class MasterTest {
-
-    @BeforeAll
-    public static void deleteClusterFiles() throws IOException {
-        FileUtils.deleteDirectory(Paths.get("target/cluster/").toFile());
-    }
-
-    @Test
-    public void testFailover() throws IOException {
-        // Verify that this process is the cluster leader
-        Awaitility.await().atMost(10, TimeUnit.SECONDS).with().until(() -> {
-            return readLeaderFile("leader").equals("leader");
-        });
-
-        // Start secondary application process
-        QuarkusProcessExecutor quarkusProcessExecutor = new 
QuarkusProcessExecutor("-Dapplication.id=follower");
-        StartedProcess process = quarkusProcessExecutor.start();
-
-        // Wait until the process is fully initialized
-        awaitStartup(quarkusProcessExecutor);
-
-        try {
-            // Verify the follower hasn't taken leader role
-            assertThat(readLeaderFile("follower"), emptyString());
-
-            // Stop camel to trigger failover
-            RestAssured.given()
-                    .get("/master/camel/stop/leader")
-                    .then()
-                    .statusCode(204);
-
-            // Verify that the secondary application has been elected as the 
cluster leader
-            Awaitility.await().atMost(10, TimeUnit.SECONDS).until(() -> {
-                return readLeaderFile("follower").equals("leader");
-            });
-        } finally {
-            if (process != null && process.getProcess().isAlive()) {
-                quarkusProcessExecutor.destroy();
-            }
-        }
-    }
-
-    private void awaitStartup(QuarkusProcessExecutor quarkusProcessExecutor) {
-        Awaitility.await().atMost(10, TimeUnit.SECONDS).pollDelay(1, 
TimeUnit.SECONDS).until(() -> {
-            return isApplicationHealthy(quarkusProcessExecutor.getHttpPort());
-        });
-    }
-
-    private boolean isApplicationHealthy(int port) {
-        try {
-            int status = RestAssured.given()
-                    .port(port)
-                    .get("/q/health")
-                    .then()
-                    .extract()
-                    .statusCode();
-            return status == 200;
-        } catch (Exception e) {
-            return false;
-        }
-    }
-
-    private String readLeaderFile(String fileName) throws IOException {
-        Path path = Paths.get(String.format("target/cluster/%s.txt", 
fileName));
-        if (path.toFile().exists()) {
-            return FileUtils.readFileToString(path.toFile(), 
StandardCharsets.UTF_8);
-        }
-        return "";
-    }
-}
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 1be4b4adf0..64b7e3fb6b 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -168,7 +168,6 @@
         <module>mail-microsoft-oauth</module>
         <module>management</module>
         <module>mapstruct</module>
-        <module>master</module>
         <module>master-file</module>
         <module>master-openshift</module>
         <module>mdc</module>
diff --git a/tooling/scripts/test-categories.yaml 
b/tooling/scripts/test-categories.yaml
index 3547897baa..b78f1ed4d3 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -147,7 +147,6 @@ group-08:
   - crypto-pgp
   - jq
   - langchain4j-chat
-  - master
   - master-file
   - pdf
   - pinecone
diff --git a/tooling/test-list/pom.xml b/tooling/test-list/pom.xml
index f8402505b4..335b88e260 100644
--- a/tooling/test-list/pom.xml
+++ b/tooling/test-list/pom.xml
@@ -57,7 +57,6 @@
                             <excludes>
                                 <exclude>support/**/*</exclude>
                                 <exclude>support/**/*</exclude>
-                                <exclude>master/pom.xml</exclude>
                                 <exclude>master-openshift/pom.xml</exclude>
                                 <exclude>master-file/pom.xml</exclude>
                                 <exclude>main-command-mode/pom.xml</exclude>

Reply via email to