apupier commented on code in PR #24509:
URL: https://github.com/apache/camel/pull/24509#discussion_r3541940533
##########
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:
the timout has been modified and we lost the poll interval
##########
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:
based on the comment, I think we do not ant to wait for 10 seconds but to
be able to fail fast so max 250ms
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
we lost the poll delay which is core to the test based on the comment
##########
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:
based on the comment, the resultWaitTime was not used on purpose
--
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]