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 8816d6fd4b Fix flaky master-file tests
8816d6fd4b is described below

commit 8816d6fd4b78ab82165fb07ec399ddc11505df8e
Author: James Netherton <[email protected]>
AuthorDate: Wed Jan 7 14:29:05 2026 +0000

    Fix flaky master-file tests
---
 .../apache/camel/quarkus/component/master/it/MasterFileTest.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git 
a/integration-tests/master-file/src/test/java/org/apache/camel/quarkus/component/master/it/MasterFileTest.java
 
b/integration-tests/master-file/src/test/java/org/apache/camel/quarkus/component/master/it/MasterFileTest.java
index 51f4d52227..bb7437a7f0 100644
--- 
a/integration-tests/master-file/src/test/java/org/apache/camel/quarkus/component/master/it/MasterFileTest.java
+++ 
b/integration-tests/master-file/src/test/java/org/apache/camel/quarkus/component/master/it/MasterFileTest.java
@@ -46,6 +46,10 @@ class MasterFileTest {
 
     @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");
+        });
 
         List<String> jvmArgs = new ArrayList<>();
         jvmArgs.add("-Dapplication.id=follower");
@@ -58,11 +62,6 @@ class MasterFileTest {
         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 taken the leader role
             assertThat(readLeaderFile("follower"), emptyString());
 

Reply via email to