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

Mamta A. Satoor commented on DERBY-6380:
----------------------------------------

Hi Myrna, thanks for working on this jira. 

It looks like the patch will handle if this specific test(ErrorStreamTest) 
failed and if so, the log files will get copied under a special directory under 
failed directory. I think this approach will be really helpful to debug any 
test fixture failures in ErrorStreamTest. 

But if in future we added a new rolling file test in a different test other 
than ErrorStreamTest, then they will need to make similar changes in that test 
to copy the log files in case of failure(similar to the patch). Or if someone 
decided to run the bigger junit suite with rolling files, the failures in that 
scenario will not have the log files copied in the failed directory. May be we 
do not anticipate many people doing a task of running junit suite with rolling 
files and hence may be we do not need to worry about that scenario but I just 
wanted to share those unique cases here if we want to handle those. Thanks

> Rolling log files do not get copied in failed directory when a junit test 
> fails
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-6380
>                 URL: https://issues.apache.org/jira/browse/DERBY-6380
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.11.0.0
>            Reporter: Mamta A. Satoor
>         Attachments: DERBY-6380.diff
>
>
> DERBY-6350(Provide a rolling file implementation of derby.log) is adding a 
> very useful feature to Derby. To test the feature, I ran the junit suite with 
> rollingFile option as shown below
> time java -Dderby.stream.error.style=rollingFile -Dderby.tests.trace=true 
> junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All > 
> runall.out 2>&1
> I noticed that even though we are running junit suite with the rollingFile, 
> we still create derby.log(although it was empty) along with expected 
> derby-0.log and so on. I had not expected to see the traditional derby.log 
> when running with rollingFile. In addition, when a test failed, the failed 
> directory had empty derby.log copied but the rolling log files did not get 
> copied. The code changes to copy the rolling log files in case of failure 
> probably need to go into org.apache.derbyTesting.junit.BaseTestCase:runBare() 
> in the "catch (Throwable running) {" section. The log files are crucial to do 
> any test failure debugging and hence should get copied in the failed 
> directory.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to