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 "Erlend Birkenes (JIRA)" <ji...@apache.org> on 2008/08/20 18:54:51 UTC

[jira] Issue Comment Edited: (DERBY-3829) Convert derbynet/sysinfo and derbynet/sysinfo_with_properties to JUnit

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

ebirkenes edited comment on DERBY-3829 at 8/20/08 9:53 AM:
-----------------------------------------------------------------

In this patch i changed BaseTestCase.assertExecJavaCmdAsExpected and added two new methods named execJavaCmd (which executes the command and returns a Process) and readProcessOutput which reads the output from a Process and returns it as a String. Two methods was necessary to allow  assertExecJavaCmdAsExpected to check the exit code of the process. 

the new method BaseTestCase.execJavaCmd is exactly the same as Utilities.execJavaCmd, and that method was only used in one test, derbynet/ServerPropertiesTest, so I changed it to use the new BaseTestCase.execJavaCmd instead and removed  Utilities.execJavaCmd.

derbynet/runtimeinfo still uses ExecProcUtil.execCmdDumpResults but when DERBY-3834 is resolved I will remove ExecProcUtil as there is only that one method in there.

I also added a singleUseDatabaseDecorator, because of the problem in DERBY-3834, just in case.

I didn't do anything about the permissions-problem Myrna was seeing, because I don't have that problem here and need more information about it.

I ran the test from classes and jars and ran derbynet/_Suite. Also ran all the tests that uses assertExecJavaCmdAsExpected to confirm that it still works the same way.

      was (Author: ebirkenes):
    In this patch i changed BaseTestCase.assertExecJavaCmdAsExpected and added two new methods named execJavaCmd (which executes the command and returns a Process) and readProcessOutput which reads the output from a Process and returns it as a String. Two methods was necessary to allow  assertExecJavaCmdAsExpected to check the exit code of the process. 

the new method BaseTestCase.execJavaCmd is exactly the same as Utilities.execJavaCmd, and that method was only used in one test, derbynet/ServerPropertiesTest, so I changed it to use the new BaseTestCase.execJavaCmd instead and removed  Utilities.execJavaCmd.

derbynet/runtimeinfo still uses ExecProcUtil.execCmdDumpResults but when DERBY-3843 is resolved I will remove ExecProcUtil as there is only that one method in there.

I also added a singleUseDatabaseDecorator, because of the problem in DERBY-3843, just in case.

I didn't do anything about the permissions-problem Myrna was seeing, because I don't have that problem here and need more information about it.

I ran the test from classes and jars and ran derbynet/_Suite. Also ran all the tests that uses assertExecJavaCmdAsExpected to confirm that it still works the same way.
  
> Convert derbynet/sysinfo and derbynet/sysinfo_with_properties to JUnit
> ----------------------------------------------------------------------
>
>                 Key: DERBY-3829
>                 URL: https://issues.apache.org/jira/browse/DERBY-3829
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.5.0.0
>            Reporter: Erlend Birkenes
>            Assignee: Erlend Birkenes
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: Derby-3829_1.diff, Derby-3829_2.diff, DERBY-3829_m3.diff
>
>
> I'm guessing these two can be combined into one file

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