You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Ludovic HOCHET (JIRA)" <ji...@apache.org> on 2016/02/14 19:17:18 UTC

[jira] [Updated] (LOG4J2-1275) RollingAppenderNoUnconditionalDeleteTest leaves the rollingtest.log which cause the test to fail when rerunning the test

     [ https://issues.apache.org/jira/browse/LOG4J2-1275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ludovic HOCHET updated LOG4J2-1275:
-----------------------------------
    Attachment: patch-log4j2-1275.diff

This proposed patch ensure the target/rolling-unconditional-deleteX directory and its test subdirectory are removed when the test is created.

Doing it on creation 1. works for me (doing it in tearDown didn't), 2. ensure that it is run even if the tests are abruptly halted.

Calling deleteDir() then deleteDirParent() does the 'recursion', deleteDir(File) avoids the code duplication.

> RollingAppenderNoUnconditionalDeleteTest leaves the rollingtest.log which cause the test to fail when rerunning the test
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1275
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1275
>             Project: Log4j 2
>          Issue Type: Test
>          Components: Core
>    Affects Versions: 2.6
>            Reporter: Ludovic HOCHET
>            Priority: Trivial
>         Attachments: patch-log4j2-1275.diff
>
>
> When running mvn install on core after a mvn clean install, the following tests fail:
>   RollingAppenderNoUnconditionalDeleteTest.testAppender:95 rolled over lines expected:<17> but was:<18>
>   RollingAppenderNoUnconditionalDeleteTest.testAppender:95 rolled over lines expected:<17> but was:<18>
>   RollingAppenderNoUnconditionalDeleteTest.testAppender:95 rolled over lines expected:<17> but was:<18>
> This seems to result from the rollingtest.log file being still present.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org