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


##########
core/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java:
##########
@@ -37,7 +34,7 @@ public void testDoneFile() throws Exception {
 
         // wait a bit and it should not pickup the written file as there is 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/FilerConsumerDualDoneFileNameTest.java:
##########
@@ -53,7 +51,7 @@ public void testOneDoneFileMissing() {
         template.sendBodyAndHeader(fileUri(), "Bye World", Exchange.FILE_NAME, 
TEST_FILE_NAME_2);
 
         // give chance to poll 2nd file but it lacks the 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/FilerConsumerPreMoveDoneFileNameTest.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/FilerConsumerShouldSkipDoneFilePrefixTest.java:
##########
@@ -38,7 +35,7 @@ public void testDoneFile() throws Exception {
 
         // wait a bit and it should not pickup the written file as there are no
         // target 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/FilerConsumerShouldSkipDoneFileSuffixTest.java:
##########
@@ -38,7 +35,7 @@ public void testDoneFile() throws Exception {
 
         // wait a bit and it should not pickup the written file as there are no
         // target file
-        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/FilerConsumerShouldSkipDoneFileTest.java:
##########
@@ -38,7 +35,7 @@ public void testDoneFile() throws Exception {
 
         // wait a bit and it should not pickup the written file as there are no
         // target 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/processor/MulticastParallelStreamingTimeoutTest.java:
##########
@@ -42,14 +38,11 @@ public void testMulticastParallelStreamingTimeout() throws 
Exception {
         mock.message(0).body().not(body().contains("A"));
         mock.message(0).body().contains("B");
         mock.message(0).body().contains("C");
-        // Use a short result wait time so each Awaitility attempt checks 
quickly
-        // without blocking (default 0 maps to 10s internally in MockEndpoint)
-        mock.setResultWaitTime(100);
+        mock.setResultWaitTime(20000);
 
         template.sendBody("direct:start", "Hello");
 
-        await().atMost(20, TimeUnit.SECONDS)
-                .untilAsserted(() -> assertMockEndpointsSatisfied());
+        assertMockEndpointsSatisfied();

Review Comment:
   Reverted — restored the rapid-poll design from CAMEL-23901: 
`setResultWaitTime(100)` for quick per-attempt checks with Awaitility retrying 
up to 20 seconds.



-- 
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