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 (Created) (JIRA)" <ji...@apache.org> on 2011/11/16 14:06:51 UTC

[jira] [Created] (DERBY-5504) SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home

SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home
------------------------------------------------------------------------------------------------

                 Key: DERBY-5504
                 URL: https://issues.apache.org/jira/browse/DERBY-5504
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.9.0.0
            Reporter: Knut Anders Hatlen


SecureServerTest, Driver40UnbootedTest and the replication tests fork JVMs by calling Runtime.exec() methods that take the command as a String parameter, not a String[]. This causes problems like the ones seen in DERBY-5490 when there's a space in ${java.home}.

The tests should be rewritten to use the helper method BaseTestCase.execJavaCmd(), which handles this case correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5504) SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home

Posted by "Dag H. Wanvik (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151629#comment-13151629 ] 

Dag H. Wanvik commented on DERBY-5504:
--------------------------------------

Patch looks good to me, +1. Do you plan to do likewise for the replication tests in a follow-up patch?
                
> SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home
> ------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5504
>                 URL: https://issues.apache.org/jira/browse/DERBY-5504
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: d5504-1a.diff
>
>
> SecureServerTest, Driver40UnbootedTest and the replication tests fork JVMs by calling Runtime.exec() methods that take the command as a String parameter, not a String[]. This causes problems like the ones seen in DERBY-5490 when there's a space in ${java.home}.
> The tests should be rewritten to use the helper method BaseTestCase.execJavaCmd(), which handles this case correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5504) SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home

Posted by "Knut Anders Hatlen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5504:
--------------------------------------

    Issue & fix info:   (was: Patch Available)

Thanks for looking at the patch, Dag.

Committed revision 1203113.

Yes, I intend to do something similar for the replication tests, but it looks as if more changes are needed for them, especially for the code that supports running tests against remote hosts. I don't think anyone has run the replication tests against remote hosts for a very long time, and given the instabilities we see when running the tests locally, I suspect there are even more problems. Maybe it's easier just to remove that code. There hasn't been much interest in improving the replication tests lately, and simplifying the tests by removing the code that supports remote testing might in fact make it easier to maintain the parts of the replication tests that we actually use in the daily testing.
                
> SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home
> ------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5504
>                 URL: https://issues.apache.org/jira/browse/DERBY-5504
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: d5504-1a.diff
>
>
> SecureServerTest, Driver40UnbootedTest and the replication tests fork JVMs by calling Runtime.exec() methods that take the command as a String parameter, not a String[]. This causes problems like the ones seen in DERBY-5490 when there's a space in ${java.home}.
> The tests should be rewritten to use the helper method BaseTestCase.execJavaCmd(), which handles this case correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DERBY-5504) SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home

Posted by "Knut Anders Hatlen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-5504.
---------------------------------------

          Resolution: Fixed
       Fix Version/s: 10.9.0.0
    Issue & fix info:   (was: Patch Available)

Committed revision 1203605.

Resolving the issue.
                
> SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home
> ------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5504
>                 URL: https://issues.apache.org/jira/browse/DERBY-5504
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.9.0.0
>
>         Attachments: d5504-1a.diff, d5504-2a.diff
>
>
> SecureServerTest, Driver40UnbootedTest and the replication tests fork JVMs by calling Runtime.exec() methods that take the command as a String parameter, not a String[]. This causes problems like the ones seen in DERBY-5490 when there's a space in ${java.home}.
> The tests should be rewritten to use the helper method BaseTestCase.execJavaCmd(), which handles this case correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5504) SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home

Posted by "Knut Anders Hatlen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5504:
--------------------------------------

    Issue & fix info: Patch Available
    
> SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home
> ------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5504
>                 URL: https://issues.apache.org/jira/browse/DERBY-5504
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: d5504-1a.diff, d5504-2a.diff
>
>
> SecureServerTest, Driver40UnbootedTest and the replication tests fork JVMs by calling Runtime.exec() methods that take the command as a String parameter, not a String[]. This causes problems like the ones seen in DERBY-5490 when there's a space in ${java.home}.
> The tests should be rewritten to use the helper method BaseTestCase.execJavaCmd(), which handles this case correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5504) SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home

Posted by "Knut Anders Hatlen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5504:
--------------------------------------

    Attachment: d5504-2a.diff

Attaching a patch for the replication tests (d5504-2a.diff).

I took the path of least resistance and only changed the exec() calls that are used when running local tests. Cleaning up the calls for distributed tests could be done later if someone starts running those tests. If someone thinks we should remove that code, that could be done in a separate JIRA issue.

The replication test suite ran cleanly in my environment when the java executable was located in a directory with a space in its name.
                
> SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home
> ------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5504
>                 URL: https://issues.apache.org/jira/browse/DERBY-5504
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: d5504-1a.diff, d5504-2a.diff
>
>
> SecureServerTest, Driver40UnbootedTest and the replication tests fork JVMs by calling Runtime.exec() methods that take the command as a String parameter, not a String[]. This causes problems like the ones seen in DERBY-5490 when there's a space in ${java.home}.
> The tests should be rewritten to use the helper method BaseTestCase.execJavaCmd(), which handles this case correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5504) SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home

Posted by "Knut Anders Hatlen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5504:
--------------------------------------

    Issue & fix info: Patch Available
            Assignee: Knut Anders Hatlen
    
> SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home
> ------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5504
>                 URL: https://issues.apache.org/jira/browse/DERBY-5504
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: d5504-1a.diff
>
>
> SecureServerTest, Driver40UnbootedTest and the replication tests fork JVMs by calling Runtime.exec() methods that take the command as a String parameter, not a String[]. This causes problems like the ones seen in DERBY-5490 when there's a space in ${java.home}.
> The tests should be rewritten to use the helper method BaseTestCase.execJavaCmd(), which handles this case correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5504) SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home

Posted by "Knut Anders Hatlen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5504:
--------------------------------------

    Attachment: d5504-1a.diff

Here's a patch that fixes the issue for SecureServerTest and Driver40UnbootedTest. It removes the explicit calls to Runtime.exec() and instead uses BaseTestCase.execJavaCmd(). Multiple command line arguments passed as a space-separated string have been changed into string arrays to prevent the problems with spaces in path names.
                
> SecureServerTest, Driver40UnbootedTest and replication tests not prepared for space in java.home
> ------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5504
>                 URL: https://issues.apache.org/jira/browse/DERBY-5504
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>         Attachments: d5504-1a.diff
>
>
> SecureServerTest, Driver40UnbootedTest and the replication tests fork JVMs by calling Runtime.exec() methods that take the command as a String parameter, not a String[]. This causes problems like the ones seen in DERBY-5490 when there's a space in ${java.home}.
> The tests should be rewritten to use the helper method BaseTestCase.execJavaCmd(), which handles this case correctly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira