[
https://issues.apache.org/jira/browse/DERBY-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576209#action_12576209
]
John H. Embretsen commented on DERBY-3510:
------------------------------------------
A potential improvement could be to change NetworkServerTestSetup around line
248:
- al.add( "java" );
+ File javaBinDir = new
File(BaseTestCase.getSystemProperty("java.home"), "bin");
+ File javaExec = new File(javaBinDir, "java");
+ al.add( javaExec.getAbsolutePath() );
This assumes that the java executable is called "java" and that it lives in a
directory called "bin" below the "java.home" of the current VM. Not 100% sure
if it will work on all relevant platforms, though.
Better suggestions are welcome...
> NetworkServerTestSetup should use the same JVM version for spawned servers as
> the test itself
> ----------------------------------------------------------------------------------------------
>
> Key: DERBY-3510
> URL: https://issues.apache.org/jira/browse/DERBY-3510
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Affects Versions: 10.3.2.1
> Environment: JUnit tests using spawned network servers
> Reporter: John H. Embretsen
> Priority: Minor
>
> org.apache.derbyTesting.junit.NetworkServerTestSetup is able to set up, start
> and stop a Network Server in a separate process from the test JVM. This
> feature is needed by a number of tests which require setting command line
> options at server startup.
> Currently, NetworkServerTestSetup assumes that "java" is the name of the JVM
> executable and that it is available in the default PATH. This is not always
> optimal, as it requires that the tester is aware that the Network server does
> not necessarily run with the same JVM (version and vendor) as the one being
> used to run the test itself.
> For example, if the PATH environment variable includes the path to JDK 1.5,
> but the test is started using JDK 6, the server will not run with the same
> JVM version as the client, which is probably not what the tester intended.
> Ideally this should probably be configurable, but a good default seems to be
> to use the same version for spawned servers as for the test client.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.