You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2007/11/05 16:44:50 UTC

[jira] Issue Comment Edited: (DERBY-3156) Convert testing of derby error stream to JUnit

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

knutanders edited comment on DERBY-3156 at 11/5/07 7:43 AM:
--------------------------------------------------------------------

Hi Vemund,

The patch generally looks good. A couple of comments/questions:

1) Do the original tests run with the client driver? It seems to me they don't, so I think it's okay to run the new test only in embedded mode.

2) I think it would be good to null out the fields when the test has completed (in tearDown()) so that the objects they reference can be garbage collected.

3) Instead of using File.deleteOnExit(), perhaps it's cleaner to delete the files explicitly in tearDown()? Seems that it would also remove the need for the runNo field.

4) I'm wondering if this code

+              new File(getSystemProperty("derby.system.home") +"foo", 
+              makeStreamFilename("file")).getCanonicalPath()); // erroneous path

would be more robust if it was written as

    new File(new File(getSystemProperty("derby.system.home"), "foo"), ...)

As it is now, I think it depends on derby.system.home ending with the path separator character.

      was (Author: knutanders):
    Hi Vemund,

The patch generally looks good. A couple of comments/questions:

1) Do the original tests run with the client driver? It seems to me they don't, so I think it's okay to run them only in embedded mode.

2) I think it would be good to null out the fields when the test has completed (in tearDown()) so that the objects they reference can be garbage collected.

3) Instead of using File.deleteOnExit(), perhaps it's cleaner to delete the files explicitly in tearDown()? Seems that it would also remove the need for the runNo field.

4) I'm wondering if this code

+              new File(getSystemProperty("derby.system.home") +"foo", 
+              makeStreamFilename("file")).getCanonicalPath()); // erroneous path

would be more robust if it was written as

    new File(new File(getSystemProperty("derby.system.home"), "foo"), ...)

As it is now, I think it depends on derby.system.home ending with the path separator character.
  
> Convert testing of derby error stream to JUnit
> ----------------------------------------------
>
>                 Key: DERBY-3156
>                 URL: https://issues.apache.org/jira/browse/DERBY-3156
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Vemund Østgaard
>            Assignee: Vemund Østgaard
>            Priority: Minor
>         Attachments: 3156-diff, 3156-diff.stat, 3156-diffv2, 3156-diffv2.stat
>
>
> Convert the tests that are related to derby error stream properties and functionality.
> Seems to be these two tests:
> lang/logStream.java 
> lang/errorStream.java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.