[
https://issues.apache.org/jira/browse/DERBY-3905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638921#action_12638921
]
Knut Anders Hatlen commented on DERBY-3905:
-------------------------------------------
The patch looks correct to me. Some small comments:
BaseTestCase.java:
- I felt that the old approach of re-throwing running from the finally clause
was clearer than the new approach where we store it in a variable and re-throw
it at the end of the method.
- There's a javadoc comment added, but no method for the javadoc.
- new File(failPath + File.separator + "derby.log") could be simplified to
new File(failPath, "derby.log")
- ioe.printStackTrace() could be replaced with
BaseTestCase.printStackTrace(ioe) so that it is always printed to the correct
stream.
PrivilegedFileOpsForTests.java:
- No checked exception is thrown in the privileged action in
getAbsolutePath(), so PrivilegedAction could be used instead of
PrivilegedExceptionAction.
- SecurityException is a RuntimeException and will never be wrapped in a
PrivilegedExceptionAction, so the "else if instance of SecurityException" part
of copy() could be removed.
- FileNotFoundException is an IOException, so the "else if instance of
FileNotFoundException" part of copy() could also be removed (FNFE will always
be picked up by the first branch of the if statement)
> Failed tests should save the database off to the fail directory
> ---------------------------------------------------------------
>
> Key: DERBY-3905
> URL: https://issues.apache.org/jira/browse/DERBY-3905
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Affects Versions: 10.5.0.0
> Reporter: Kathey Marsden
> Assignee: Kathey Marsden
> Priority: Minor
> Attachments: derby-3905_diff.txt
>
>
> Currently failed tests save the derby.log to the fail directory for that
> test. It would be useful to save the database as well.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.