This is an automated email from the ASF dual-hosted git repository. jiriondrusek pushed a commit to branch camel-main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 120fed0aec77fe9880ba8ab2e37201c08f84fcbc Author: James Netherton <[email protected]> AuthorDate: Wed Jan 7 16:19:23 2026 +0000 Fix flaky master test --- .../apache/camel/quarkus/component/master/it/MasterTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 index e1cad60ec5..49f4131a00 100644 --- 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 @@ -44,6 +44,11 @@ class MasterTest { @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(); @@ -52,12 +57,7 @@ class MasterTest { awaitStartup(quarkusProcessExecutor); try { - // Verify that this process is the cluster leader - Awaitility.await().atMost(10, TimeUnit.SECONDS).with().until(() -> { - return readLeaderFile("leader").equals("leader"); - }); - - // Verify the follower hasn't took leader role + // Verify the follower hasn't taken leader role assertThat(readLeaderFile("follower"), emptyString()); // Stop camel to trigger failover
