[
https://issues.apache.org/jira/browse/GROOVY-12573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King resolved GROOVY-12573.
--------------------------------
Fix Version/s: 7.0.0-alpha-1
6.0.1
Resolution: Fixed
> LogTest loses its spy handler when the logger is garbage collected before the
> class under test logs
> ---------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12573
> URL: https://issues.apache.org/jira/browse/GROOVY-12573
> Project: Groovy
> Issue Type: Test
> Reporter: Scott Murphy Heiberg
> Assignee: Paul King
> Priority: Major
> Fix For: 7.0.0-alpha-1, 6.0.1
>
>
> {{LogTest.registerLogFormatterSpy}} adds a handler to
> {{Logger.getLogger(name)}} without keeping the logger. The {{LogManager}}
> holds loggers weakly, so a garbage collection before the class under test
> initializes drops the logger, and the class gets a new one without the spy;
> {{testDefaultCategory}} then fails (seen on CI).
> PR: https://github.com/apache/groovy/pull/3101
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)