[ 
https://issues.apache.org/jira/browse/GEODE-5637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613733#comment-16613733
 ] 

Kirk Lund commented on GEODE-5637:
----------------------------------

Geode currently manipulates Log4J2 at runtime to add/remove Appenders based on 
the Cache lifecycle. Sai and I tried to add ListAppender [1] from log4j-core 
test-jar programmatically at runtime using the same code that Geode uses for 
ConsoleAppender and LogWriterAppender. Unfortunately, this behavior seems to 
either never have worked or was broken by one of the Log4J2 dependency upgrades 
over the last couple years.

In our opinion, it doesn't make sense to continue in this direction. GEODE-2644 
describes an alternate approach which would be much easier and User friendly in 
the long-run, so I'm planning to change the Geode appenders as described by 
GEODE-2644 and then add debug functionality to the Geode appenders which tests 
such this can easily use for easy testing.

[1] https://relentlesscoding.com/2018/04/21/unit-test-log4j2-log-output/

> Flaky: SingleHopClientExecutorWithLoggingIntegrationTest fails intermittently
> -----------------------------------------------------------------------------
>
>                 Key: GEODE-5637
>                 URL: https://issues.apache.org/jira/browse/GEODE-5637
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>            Reporter: Kirk Lund
>            Assignee: Kirk Lund
>            Priority: Major
>              Labels: flaky, pull-request-available, swat
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This test should also be an integration test but it's in the test src set.
> {noformat}
> > Task :geode-core:test
> org.apache.geode.cache.client.internal.SingleHopClientExecutorSubmitTaskWithExceptionTest
>  > submittedTaskShouldLogFailure FAILED
>     org.awaitility.core.ConditionTimeoutException: Assertion condition 
> defined as a lambda expression in 
> org.apache.geode.cache.client.internal.SingleHopClientExecutorSubmitTaskWithExceptionTest
>  
>     Expecting:
>      <"">
>     to contain:
>      <"I am expecting this to be logged">  within 2 minutes.
>         at 
> org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:145)
>         at 
> org.awaitility.core.AssertionCondition.await(AssertionCondition.java:122)
>         at 
> org.awaitility.core.AssertionCondition.await(AssertionCondition.java:32)
>         at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:890)
>         at 
> org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:711)
>         at 
> org.apache.geode.cache.client.internal.SingleHopClientExecutorSubmitTaskWithExceptionTest.submittedTaskShouldLogFailure(SingleHopClientExecutorSubmitTaskWithExceptionTest.java:54)
>         Caused by:
>         java.lang.AssertionError: 
>         Expecting:
>          <"">
>         to contain:
>          <"I am expecting this to be logged"> 
>             at 
> org.apache.geode.cache.client.internal.SingleHopClientExecutorSubmitTaskWithExceptionTest.lambda$submittedTaskShouldLogFailure$1(SingleHopClientExecutorSubmitTaskWithExceptionTest.java:54)
> 4490 tests completed, 1 failed, 9 skipped
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to