This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 534c757c8ea6 CAMEL-25450: Stabilize flaky IgniteComputeTest (#27737)
534c757c8ea6 is described below
commit 534c757c8ea6a427557704c7c8dd990dcd278019
Author: Aurélien Pupier <[email protected]>
AuthorDate: Mon Oct 12 22:49:55 2026 +0200
CAMEL-25450: Stabilize flaky IgniteComputeTest (#27737)
Co-authored-by: IBM Bob 2.2.1
---
.../camel/component/ignite/IgniteComputeTest.java | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git
a/components/camel-ignite/src/test/java/org/apache/camel/component/ignite/IgniteComputeTest.java
b/components/camel-ignite/src/test/java/org/apache/camel/component/ignite/IgniteComputeTest.java
index 81bc60e60e61..b1a2694566a2 100644
---
a/components/camel-ignite/src/test/java/org/apache/camel/component/ignite/IgniteComputeTest.java
+++
b/components/camel-ignite/src/test/java/org/apache/camel/component/ignite/IgniteComputeTest.java
@@ -134,7 +134,8 @@ public class IgniteComputeTest extends AbstractIgniteTest {
Object result = template.requestBody("ignite-compute:" + resourceUid +
"?executionType=BROADCAST",
TestIgniteComputeResources.TEST_RUNNABLE, Object.class);
Assertions.assertThat(result).isNull();
-
Assertions.assertThat(TestIgniteComputeResources.COUNTER.get()).isEqualTo(3);
+ Awaitility.await().atMost(10, TimeUnit.SECONDS)
+ .untilAsserted(() ->
Assertions.assertThat(TestIgniteComputeResources.COUNTER.get()).isEqualTo(3));
// Single Callable.
Collection<String> colResult = template.requestBody("ignite-compute:"
+ resourceUid + "?executionType=BROADCAST",
@@ -209,18 +210,27 @@ public class IgniteComputeTest extends AbstractIgniteTest
{
Awaitility.await().atMost(30, TimeUnit.SECONDS)
.until(() -> {
IgniteCluster cluster = igniteInstance.cluster();
+ IgniteCluster mainCluster = ignite().cluster();
return cluster.nodes().size() ==
ADDITIONAL_INSTANCES.size() + 1
- && cluster.state().active();
+ && cluster.state().active()
+ && mainCluster.nodes().size() ==
ADDITIONAL_INSTANCES.size() + 1
+ && mainCluster.state().active();
});
}
@AfterEach
public void stopAdditionalIgniteInstances() {
- for (Ignite ignite : ADDITIONAL_INSTANCES) {
- ignite.close();
+ if (!ADDITIONAL_INSTANCES.isEmpty()) {
+ for (Ignite ignite : ADDITIONAL_INSTANCES) {
+ ignite.close();
+ }
+ ADDITIONAL_INSTANCES.clear();
+ if (ignite() != null) {
+ Awaitility.await().atMost(30, TimeUnit.SECONDS)
+ .until(() -> ignite().cluster().nodes().size() == 1);
+ }
}
- ADDITIONAL_INSTANCES.clear();
}
@AfterEach