You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "vy (via GitHub)" <gi...@apache.org> on 2025/10/10 07:20:49 UTC

Re: [PR] Fix: Replace fixed delay with Awaitility in SyslogAppenderCustomLayoutTest [logging-log4j2]

vy commented on code in PR #3944:
URL: https://github.com/apache/logging-log4j2/pull/3944#discussion_r2418740107


##########
log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderTestBase.java:
##########
@@ -43,13 +43,16 @@
 import org.apache.logging.log4j.util.Strings;
 import org.junit.jupiter.api.BeforeAll;
 
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+import static org.awaitility.Awaitility.await;
+
 @UsingStatusListener
 abstract class SyslogAppenderTestBase {
     protected static final String line1 =
             "TestApp - Audit [Transfer@18060 Amount=\"200.00\" FromAccount=\"123457\" ToAccount=\"123456\"]"
                     + "[RequestContext@18060 ipAddress=\"192.168.0.120\" loginId=\"JohnDoe\"] Transfer Complete";
     protected LoggerContext ctx = LoggerContext.getContext();
-    protected static final int DEFAULT_TIMEOUT_IN_MS = 100;
+    protected static final int DEFAULT_TIMEOUT_IN_MS = 500;

Review Comment:
   We can be a little bit generous here, Awaitility's default poll period is 100ms anyway.
   
   ```suggestion
       protected static final int DEFAULT_TIMEOUT_IN_MS = 3000;
   ```



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org