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 d78d3e62ba62c7ad5fec9e4046fc72d825b3ae37 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());
