gnodet commented on code in PR #24509:
URL: https://github.com/apache/camel/pull/24509#discussion_r3542063407


##########
components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsReplyToLoopIssueTest.java:
##########
@@ -55,7 +52,7 @@ public void testReplyToLoopIssue() throws Exception {
         template.sendBodyAndHeader("direct:start", "World", "JMSReplyTo", 
"queue:JmsReplyToLoopIssueTest.bar");
 
         // fail fast if an endless reply loop keeps producing messages
-        Awaitility.await().atMost(250, TimeUnit.MILLISECONDS).untilAsserted(() 
-> MockEndpoint.assertIsSatisfied(context));
+        MockEndpoint.assertIsSatisfied(context);

Review Comment:
   Good catch — reverted. The `atMost(250ms)` is deliberately short for loop 
detection, not a wait for messages. Restored the original Awaitility usage.



##########
components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpIdleTimeoutStrategyTest.java:
##########
@@ -150,8 +149,7 @@ private void sendHl7Message(ProducerTemplate template) 
throws Exception {
         template.sendBody(Hl7TestMessageGenerator.generateMessage());
 
         // Need to send one message to get the connection established
-        Awaitility.await().atMost(IDLE_TIMEOUT * 3, 
TimeUnit.MILLISECONDS).pollInterval(500, TimeUnit.MILLISECONDS)
-                .untilAsserted(() -> MockEndpoint.assertIsSatisfied(context, 
5, TimeUnit.SECONDS));
+        MockEndpoint.assertIsSatisfied(context, 5, TimeUnit.SECONDS);

Review Comment:
   Reverted — restored the original `pollInterval(500ms)` retry semantics.



##########
core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentConfirmTest.java:
##########
@@ -73,7 +73,7 @@ public void testIdempotentConfirm() throws Exception {
 
         // should NOT consume the file again, let a bit time pass to let the
         // consumer try to consume it but it should not
-        Awaitility.await().pollDelay(100, 
TimeUnit.MILLISECONDS).untilAsserted(() -> assertMockEndpointsSatisfied());
+        assertMockEndpointsSatisfied();

Review Comment:
   Reverted — the `pollDelay` is critical for this negative assertion 
(`expectedMessageCount(0)`). Without it, `assertIsSatisfied()` returns 
immediately when 0 messages are expected, making the test pass vacuously.



##########
core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentTest.java:
##########
@@ -70,8 +70,7 @@ public void testIdempotent() throws Exception {
 
         // should NOT consume the file again, let a bit time pass to let the
         // consumer try to consume it but it should not
-        Awaitility.await().pollDelay(1, TimeUnit.SECONDS).atMost(2, 
TimeUnit.SECONDS)
-                .untilAsserted(() -> assertMockEndpointsSatisfied());
+        assertMockEndpointsSatisfied();

Review Comment:
   Reverted — the `pollDelay` is critical for this negative assertion 
(`expectedMessageCount(0)`). Without it, `assertIsSatisfied()` returns 
immediately when 0 messages are expected, making the test pass vacuously.



##########
core/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java:
##########
@@ -39,7 +37,7 @@ public void testDoneFile() throws Exception {
 
         // wait a bit and it should not pickup the written file as there are no
         // done file
-        Awaitility.await().pollDelay(50, 
TimeUnit.MILLISECONDS).untilAsserted(() -> assertMockEndpointsSatisfied());
+        assertMockEndpointsSatisfied();

Review Comment:
   Reverted — the `pollDelay` is critical for this negative assertion 
(`expectedMessageCount(0)`). Without it, `assertIsSatisfied()` returns 
immediately when 0 messages are expected, making the test pass vacuously.



##########
core/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNamePrefixTest.java:
##########
@@ -37,7 +34,7 @@ public void testDoneFile() throws Exception {
 
         // wait a bit and it should not pickup the written file as there are no
         // done file
-        Awaitility.await().pollDelay(250, 
TimeUnit.MILLISECONDS).untilAsserted(() -> assertMockEndpointsSatisfied());
+        assertMockEndpointsSatisfied();

Review Comment:
   Reverted — the `pollDelay` is critical for this negative assertion 
(`expectedMessageCount(0)`). Without it, `assertIsSatisfied()` returns 
immediately when 0 messages are expected, making the test pass vacuously.



##########
core/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameSimplePrefixTest.java:
##########
@@ -37,7 +34,7 @@ public void testDoneFile() throws Exception {
 
         // wait a bit and it should not pickup the written file as there are no
         // done file
-        Awaitility.await().pollDelay(250, 
TimeUnit.MILLISECONDS).untilAsserted(() -> assertMockEndpointsSatisfied());
+        assertMockEndpointsSatisfied();

Review Comment:
   Reverted — the `pollDelay` is critical for this negative assertion 
(`expectedMessageCount(0)`). Without it, `assertIsSatisfied()` returns 
immediately when 0 messages are expected, making the test pass vacuously.



##########
core/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameSuffixTest.java:
##########
@@ -37,7 +34,7 @@ public void testDoneFile() throws Exception {
 
         // wait a bit and it should not pickup the written file as there are no
         // done file
-        Awaitility.await().pollDelay(250, 
TimeUnit.MILLISECONDS).untilAsserted(() -> assertMockEndpointsSatisfied());
+        assertMockEndpointsSatisfied();

Review Comment:
   Reverted — the `pollDelay` is critical for this negative assertion 
(`expectedMessageCount(0)`). Without it, `assertIsSatisfied()` returns 
immediately when 0 messages are expected, making the test pass vacuously.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to