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


##########
components/camel-syslog/src/test/java/org/apache/camel/component/syslog/SyslogSpringNettyTest.java:
##########
@@ -66,12 +69,12 @@ public void testSendingRawUDP() throws IOException, 
InterruptedException {
 
                 DatagramPacket packet = new DatagramPacket(data, data.length, 
address, serverPort.getPort());
                 socket.send(packet);
-                Thread.sleep(100);
             }
         } finally {
             socket.close();
         }
 
-        MockEndpoint.assertIsSatisfied(context);
+        await().atMost(10, TimeUnit.SECONDS)
+                .untilAsserted(() -> MockEndpoint.assertIsSatisfied(context));

Review Comment:
   Per apupier's feedback and project guidelines, consider using MockEndpoint's 
built-in timed overload:
   
   ```suggestion
           MockEndpoint.assertIsSatisfied(context, 10, TimeUnit.SECONDS);
   ```
   
   This avoids adding Awaitility polling on top of MockEndpoint's internal 
CountDownLatch-based wait, which is redundant.



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