dongjinleekr commented on pull request #7898:
URL: https://github.com/apache/kafka/pull/7898#issuecomment-648795743


   Here is the fix. I completed to implement all the features, migrating tests 
to follow log4j2 API, and rebasing onto the latest trunk, but there is a 
problem in logging message validation.
   
   
![gradle-fail](https://user-images.githubusercontent.com/2375128/85557994-4abae000-b663-11ea-8986-7b5dbbf8f80e.png)
   
   When I run `:stream:test` task in my dev environment, the following 10 tests 
fail:
   
   - `StreamsConfigTest`: `shouldLogWarningWhenPartitionGrouperIsUsed`
   - `KStreamKTableJoinTest`: 
`shouldLogAndMeterWhenSkippingNullLeft[Key,Value]WithBuiltInMetricsVersion[Latest,0100To24]`
   - `InMemorySessionStoreTest`: 
`shouldLogAndMeasureExpiredRecordsWithBuiltInMetricsVersion[Latest,0100To24]`, 
`shouldNotThrowInvalidRangeExceptionWithNegativeFromKey`
   - `RocksDBTimestampedStoreTest`: 
`shouldMigrateDataFromDefaultToTimestampColumnFamily`, 
`shouldOpenNewStoreInRegularMode`
   
   However, If I run the test suites `StreamsConfigTest`, 
`KStreamKTableJoinTest`, and `InMemorySessionStoreTest` individually, they work 
fine.
   
   And if I run `RocksDBTimestampedStoreTest` test suite, it fails; the 
expected log message does not forwarded to the appender.
   
   
![2](https://user-images.githubusercontent.com/2375128/85558065-5c03ec80-b663-11ea-8411-9aadb9c6d29a.png)
   
   In contrast, if I run the test methods individually, they also work fine:
   
   
![1](https://user-images.githubusercontent.com/2375128/85558106-64f4be00-b663-11ea-9a86-89e67a980757.png)
   
   It seems like there is a problem with log4j in forwarding the log message to 
the appender. (Or is the appender closed before the log message arrives?) But I 
can't certain; I followed the way log4j2 test suites do, but could not find 
similar cases in their codebase.
   
   I tried to fix this problem for several days but not succeeded. If you have 
some spare time, could you check out this PR and run the tests on your machine? 
I am working with Ubuntu 20.04 + OpenJDK 8. I am curious the same tests also 
fail in the other environments.
   
   cc/ @ijuma @OneCricketeer @jeffhuang26


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

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


Reply via email to