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 b0dbceb83b Fix intermittent InfinispanClusterServiceTest.testFailover
failure
b0dbceb83b is described below
commit b0dbceb83b09d25f736108e4e37d83009cd3612a
Author: James Netherton <[email protected]>
AuthorDate: Tue Aug 4 07:04:09 2026 +0100
Fix intermittent InfinispanClusterServiceTest.testFailover failure
The test was failing intermittently in native mode because stale cluster
files from previous test runs could interfere with the test assertions.
The cleanup was happening after the test (@AfterEach), meaning subsequent
test runs could start with leftover files.
Changed the cleanup method from @AfterEach to @BeforeEach to ensure the
target/cluster/ directory is cleaned before each test run, eliminating
the race condition.
Fixes #8899
---
.../quarkus/component/master/it/InfinispanClusterServiceTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceTest.java
b/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceTest.java
index 5502bd9926..4a654b14ba 100644
---
a/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceTest.java
+++
b/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceTest.java
@@ -32,7 +32,7 @@ import org.apache.commons.io.FileUtils;
import org.awaitility.Awaitility;
import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
-import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.zeroturnaround.exec.StartedProcess;
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.emptyString;
@QuarkusTest
@QuarkusTestResource(InfinispanClusterServiceTestResource.class)
class InfinispanClusterServiceTest {
- @AfterEach
+ @BeforeEach
public void deleteClusterFiles() {
FileUtils.deleteQuietly(Paths.get("target/cluster/").toFile());
}