You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2026/03/19 08:44:39 UTC
(camel) branch CAMEL-22110 created (now 953e1f6caa0e)
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a change to branch CAMEL-22110
in repository https://gitbox.apache.org/repos/asf/camel.git
at 953e1f6caa0e CAMEL-22110: Fix flaky HazelcastQueueConsumerPollTest
This branch includes the following new commits:
new 953e1f6caa0e CAMEL-22110: Fix flaky HazelcastQueueConsumerPollTest
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(camel) 01/01: CAMEL-22110: Fix flaky HazelcastQueueConsumerPollTest
Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch CAMEL-22110
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 953e1f6caa0e594a8f91c232fcf25075f6906974
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Mar 19 09:42:36 2026 +0100
CAMEL-22110: Fix flaky HazelcastQueueConsumerPollTest
The mock queue.poll() returned "foo" on every call, so the consumer
kept sending messages to mock:result (67 instead of expected 1). Fix by
returning "foo" only once then null for subsequent calls. Also re-enable
the test on CI by removing @DisabledIfSystemProperty.
Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>
---
.../camel/component/hazelcast/HazelcastQueueConsumerPollTest.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastQueueConsumerPollTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastQueueConsumerPollTest.java
index 5d8c7d77a3a6..34de00ce0911 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastQueueConsumerPollTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastQueueConsumerPollTest.java
@@ -24,7 +24,6 @@ import com.hazelcast.core.HazelcastInstance;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.mockito.Mock;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -35,7 +34,6 @@ import static org.mockito.Mockito.atLeast;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-@DisabledIfSystemProperty(named = "ci.env.name", matches = ".*", disabledReason = "Flaky on GitHub Actions")
public class HazelcastQueueConsumerPollTest extends HazelcastCamelTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(HazelcastQueueConsumerPollTest.class);
@@ -59,7 +57,7 @@ public class HazelcastQueueConsumerPollTest extends HazelcastCamelTestSupport {
@Test
public void add() throws InterruptedException {
- when(queue.poll(10000, TimeUnit.MILLISECONDS)).thenReturn("foo");
+ when(queue.poll(10000, TimeUnit.MILLISECONDS)).thenReturn("foo").thenReturn(null);
MockEndpoint out = getMockEndpoint("mock:result");
out.expectedMessageCount(1);