codeconsole opened a new pull request, #3101:
URL: https://github.com/apache/groovy/pull/3101

   `LogTest.registerLogFormatterSpy` added a handler to 
`Logger.getLogger(name)` and kept no reference to the logger. The `LogManager` 
holds loggers weakly, so a garbage collection before the class under test 
initialized dropped it, and the class's own `Logger.getLogger(name)` returned a 
new logger without the spy; `testDefaultCategory` failed on CI that way. The 
test now keeps each spied logger until it ends. 
`testSpyIsKeptWhenGarbageIsCollectedBeforeTheClassLogs` forces the collection 
and fails without the change. Test code only.
   
   The `groovy-logging-test` tests pass (107), as do the Checkstyle and 
CodeNarc gates.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to