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 553e7887a411 CAMEL-26638: camel-hazelcast - fix flaky
HazelcastReliableTopicConsumerLossTest.listenerCancelledByHazelcastIsReported
(#29248)
553e7887a411 is described below
commit 553e7887a41103277ae9148628c960b4e4902aef
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 5 16:51:58 2026 +0100
CAMEL-26638: camel-hazelcast - fix flaky
HazelcastReliableTopicConsumerLossTest.listenerCancelledByHazelcastIsReported
(#29248)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---
.../hazelcast/HazelcastReliableTopicConsumerLossTest.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git
a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReliableTopicConsumerLossTest.java
b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReliableTopicConsumerLossTest.java
index de8fc0fcc267..52659be38e6d 100644
---
a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReliableTopicConsumerLossTest.java
+++
b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReliableTopicConsumerLossTest.java
@@ -120,10 +120,13 @@ class HazelcastReliableTopicConsumerLossTest extends
CamelTestSupport {
@Test
void listenerCancelledByHazelcastIsReported() throws Exception {
- // Hazelcast cancels the listener when the topic is destroyed: the
consumer receives nothing more
- member.getReliableTopic("news").destroy();
-
- await().atMost(10, TimeUnit.SECONDS).until(() -> !reported.isEmpty());
+ // Hazelcast cancels the listener when the topic is destroyed: the
consumer receives nothing more.
+ // Only a read of the listener that waits on the ringbuffer is
cancelled; a read that reaches the member after
+ // the destroy waits on a new ringbuffer instead, so destroy the topic
again until the consumer reports it
+ await().atMost(10, TimeUnit.SECONDS).pollInterval(200,
TimeUnit.MILLISECONDS).until(() -> {
+ member.getReliableTopic("news").destroy();
+ return !reported.isEmpty();
+ });
assertEquals(1, reported.size(), "Reported: " + reported);
assertTrue(reported.get(0).contains("Hazelcast cancelled the listener
of the reliable topic news"),
"Reported: " + reported);