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 b69081a53a Fix flaky master test
b69081a53a is described below
commit b69081a53a0bc886d3bf0f2891a736f3a755eee3
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