db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3273) convert derbynet/testconnection.java to junit
Date Thu, 13 Dec 2007 01:27:43 GMT

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

Daniel John Debrunner commented on DERBY-3273:
----------------------------------------------

In the Utilities.execCmd() if Runtime.getRuntime().exec(command) throws an exception a NPE
will result.

I think the exception should simply be thrown which will cause the test to fail.

In the same method:

+            if (pr.exitValue() != expectedExitCode) {
+                BaseTestCase.fail("FAIL: expected exit code of " + expectedExitCode
+                                + ", got exit code of " + pr.exitValue());
+            }

any reason not to use Assert.assertEquals()?

and

+            int j = 0;
+            for (int i = 3; i < totalSize; i++) {
+                cmd[i] = args[j++];
+            }

any reason not to use System.arraycopy()?

Putting this exec in Utilities is good, it could be the base to fix DERBY-3250 since the new
method handles multiple arguments correctly.


> convert derbynet/testconnection.java to junit
> ---------------------------------------------
>
>                 Key: DERBY-3273
>                 URL: https://issues.apache.org/jira/browse/DERBY-3273
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Kathey Marsden
>            Priority: Minor
>         Attachments: derby-3273_diff.txt
>
>
> convert derbynet/testconnection.java to junit.

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


Mime
View raw message