db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6380) Rolling log files do not get copied in failed directory when a junit test fails
Date Fri, 22 Nov 2013 06:55:35 GMT

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

Myrna van Lunteren updated DERBY-6380:
--------------------------------------

    Attachment: DERBY-6380.diff_2

Separate from the issues I found while running the tests, going back to attempting to address
this particular issue.

Attaching a second patch, which does the same for the ErrorStreamTest, but also copies any
derby-#.log file to the fail directory.

I did not run a performance check on a full suites.All to see if this slows down the full
test run. It probably does, a little, because it tries to copy 10 files that might not exist,
for each test run. 

So, is this something we want to do or should I only commit the ErrorStreamTest improvement
(probably will create a separate issue for it) and mark this particular issue as 'Won't fix'?

Yet another approach is that I could make the change to BaseTestCase dependent on whether
the property derby.stream.error.style is set to 'rollingFile'. But it still seems a global
change for an unlikely run scenario to me.

> 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-6380.diff_2
>
>
> 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)

Mime
View raw message