You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Gary Gregory <ga...@gmail.com> on 2017/09/11 19:16:29 UTC

Random failure in AsyncLoggerAndAsyncAppenderTest

Just FYI:

I am seeing this random but infrequent failure:

[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
1.62 s <<< FAILURE! - in
org.apache.logging.log4j.core.async.AsyncLoggerThreadContextGarbageFreeTest
[ERROR] testAsyncLogWritesToLog[GARBAGE_FREE
BOTH_ALL_ASYNC_AND_MIXED](org.apache.logging.log4j.core.async.AsyncLoggerThreadContextGarbageFreeTest)
Time elapsed: 0.284 s  <<< FAILURE!
org.junit.ComparisonFailure: AsyncLoggerAndAsyncAppenderTest.log: line 0
expected:<...syncLoggerContext i=[0]> but was:<...syncLoggerContext i=[128]>

Gary

Re: Random failure in AsyncLoggerAndAsyncAppenderTest

Posted by Remko Popma <re...@gmail.com>.
I've looked at this before but couldn't figure it out. I'll take another look. 

(Shameless plug) Every java main() method deserves http://picocli.info

> On Sep 12, 2017, at 9:00, Matt Sicker <bo...@gmail.com> wrote:
> 
> I'm pretty sure I've seen that failure (or something similar at least)
> several times before. I believe the issue is essentially due to
> asynchronicity compared to JUnit. I wonder if JUnit 5 has async test
> support, though if we upgrade to that, then the tests will require Java 8.
> 
>> On 11 September 2017 at 14:16, Gary Gregory <ga...@gmail.com> wrote:
>> 
>> Just FYI:
>> 
>> I am seeing this random but infrequent failure:
>> 
>> [ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
>> 1.62 s <<< FAILURE! - in
>> org.apache.logging.log4j.core.async.AsyncLoggerThreadContextGarbag
>> eFreeTest
>> [ERROR] testAsyncLogWritesToLog[GARBAGE_FREE
>> BOTH_ALL_ASYNC_AND_MIXED](org.apache.logging.log4j.core.async.
>> AsyncLoggerThreadContextGarbageFreeTest)
>> Time elapsed: 0.284 s  <<< FAILURE!
>> org.junit.ComparisonFailure: AsyncLoggerAndAsyncAppenderTest.log: line 0
>> expected:<...syncLoggerContext i=[0]> but was:<...syncLoggerContext
>> i=[128]>
>> 
>> Gary
>> 
> 
> 
> 
> -- 
> Matt Sicker <bo...@gmail.com>

Re: Random failure in AsyncLoggerAndAsyncAppenderTest

Posted by Matt Sicker <bo...@gmail.com>.
I'm pretty sure I've seen that failure (or something similar at least)
several times before. I believe the issue is essentially due to
asynchronicity compared to JUnit. I wonder if JUnit 5 has async test
support, though if we upgrade to that, then the tests will require Java 8.

On 11 September 2017 at 14:16, Gary Gregory <ga...@gmail.com> wrote:

> Just FYI:
>
> I am seeing this random but infrequent failure:
>
> [ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> 1.62 s <<< FAILURE! - in
> org.apache.logging.log4j.core.async.AsyncLoggerThreadContextGarbag
> eFreeTest
> [ERROR] testAsyncLogWritesToLog[GARBAGE_FREE
> BOTH_ALL_ASYNC_AND_MIXED](org.apache.logging.log4j.core.async.
> AsyncLoggerThreadContextGarbageFreeTest)
> Time elapsed: 0.284 s  <<< FAILURE!
> org.junit.ComparisonFailure: AsyncLoggerAndAsyncAppenderTest.log: line 0
> expected:<...syncLoggerContext i=[0]> but was:<...syncLoggerContext
> i=[128]>
>
> Gary
>



-- 
Matt Sicker <bo...@gmail.com>