Use longs for timeouts. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/1b3c6af6 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/1b3c6af6 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/1b3c6af6
Branch: refs/heads/LOG4J2-1349-gcfree-threadcontext Commit: 1b3c6af6bc24461c736ee2c7a8aa1fc8c1bb4c4e Parents: 8c80cb9 Author: Gary Gregory <ggreg...@apache.org> Authored: Thu Sep 8 15:00:32 2016 -0700 Committer: Gary Gregory <ggreg...@apache.org> Committed: Thu Sep 8 15:00:32 2016 -0700 ---------------------------------------------------------------------- .../apache/logging/log4j/core/appender/AsyncAppenderTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1b3c6af6/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java index 8c57efd..01beb48 100644 --- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java +++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/AsyncAppenderTest.java @@ -39,7 +39,7 @@ import static org.junit.Assert.*; @RunWith(Parameterized.class) public class AsyncAppenderTest { - private static final int TIMEOUT_MILLIS = 2000; + private static final long TIMEOUT_MILLIS = 2000; @Parameterized.Parameters(name = "{0}") public static Object[] data() { @@ -78,7 +78,7 @@ public class AsyncAppenderTest { final Logger logger = LogManager.getLogger(AsyncAppender.class); logger.error("This is a test"); logger.warn("Hello world!"); - final int timeoutMillis = TIMEOUT_MILLIS; + final long timeoutMillis = TIMEOUT_MILLIS; final TimeUnit timeUnit = TimeUnit.MILLISECONDS; final List<String> list = listAppender.getMessages(timeoutMillis, timeUnit); assertNotNull("No events generated", list); @@ -98,7 +98,7 @@ public class AsyncAppenderTest { final Exception parent = new IllegalStateException("Test"); final Throwable child = new LoggingException("This is a test", parent); logger.error("This is a test", child); - final int timeoutMillis = TIMEOUT_MILLIS; + final long timeoutMillis = TIMEOUT_MILLIS; final TimeUnit timeUnit = TimeUnit.MILLISECONDS; final List<String> list = listAppender.getMessages(timeoutMillis, timeUnit); assertNotNull("No events generated", list);