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 "Myrna van Lunteren (JIRA)" <de...@db.apache.org> on 2006/03/22 19:23:08 UTC

[jira] Created: (DERBY-1141) test harness usage of useprocess needs improvement

test harness usage of useprocess needs improvement
--------------------------------------------------

         Key: DERBY-1141
         URL: http://issues.apache.org/jira/browse/DERBY-1141
     Project: Derby
        Type: Improvement
    Reporter: Myrna van Lunteren
 Assigned to: Myrna van Lunteren 


The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.

This functionality is useful for debugging test runs within an IDE.

Also, it is potentially useful for speeding up testruns.

However, currently, there are some problems and shortcomings of this functionality.
- For instance, when running a networkserver test of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
- running networkserver tests with useprocess=false doesn't actually make things any faster,
  because networkserver gets started fresh for every test and then a new db is created. 
  However, it should be feasible to start networkserver with the first test in a suite, then use that 
  networkserver  for subsequent tests and shutdown networkserver when the suite finishes.

- Also, (reported by Mike Matrigali off-list) currently, the following:
------------------
java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
------------------
makes the test fall out of the harness with: Exception in thread "main"
and in the .tmp:
------------------
java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
        at java.security.AccessController.checkPermission(AccessController.java:401)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
        at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
        at java.io.File.exists(File.java:678)
        at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
        at java.io.File.getCanonicalPath(File.java:513)
        at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
        at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
        at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
--------------------------------
  removing the -Doutputdir fixes that problem, but shouldn't be needed.

- there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
  I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1141?page=all ]

Myrna van Lunteren updated DERBY-1141:
--------------------------------------

    Component: Test

> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement
>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren

>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1141?page=all ]

Myrna van Lunteren updated DERBY-1141:
--------------------------------------

    Description: 
The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.

This functionality is useful for debugging test runs within an IDE.

Also, it is potentially useful for speeding up testruns.

However, currently, there are some problems and shortcomings of this functionality.
- For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
- running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
  However, it should be feasible to start networkserver with the first test in a suite, then use that 
  networkserver  for subsequent tests and shutdown networkserver when the suite finishes.

- Also, (reported by Mike Matrigali off-list) currently, the following:
------------------
java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
------------------
makes the test fall out of the harness with: Exception in thread "main"
and in the .tmp:
------------------
java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
        at java.security.AccessController.checkPermission(AccessController.java:401)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
        at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
        at java.io.File.exists(File.java:678)
        at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
        at java.io.File.getCanonicalPath(File.java:513)
        at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
        at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
        at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
--------------------------------
  removing the -Doutputdir gets around that problem, but shouldn't be needed.

- there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
  I couldn't duplicate this yet, maybe more info to follow.

  was:
The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.

This functionality is useful for debugging test runs within an IDE.

Also, it is potentially useful for speeding up testruns.

However, currently, there are some problems and shortcomings of this functionality.
- For instance, when running a networkserver test of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
- running networkserver tests with useprocess=false doesn't actually make things any faster,
  because networkserver gets started fresh for every test and then a new db is created. 
  However, it should be feasible to start networkserver with the first test in a suite, then use that 
  networkserver  for subsequent tests and shutdown networkserver when the suite finishes.

- Also, (reported by Mike Matrigali off-list) currently, the following:
------------------
java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
------------------
makes the test fall out of the harness with: Exception in thread "main"
and in the .tmp:
------------------
java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
        at java.security.AccessController.checkPermission(AccessController.java:401)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
        at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
        at java.io.File.exists(File.java:678)
        at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
        at java.io.File.getCanonicalPath(File.java:513)
        at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
        at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
        at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
--------------------------------
  removing the -Doutputdir fixes that problem, but shouldn't be needed.

- there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
  I couldn't duplicate this yet, maybe more info to follow.


> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement
>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren

>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1141?page=comments#action_12412432 ] 

Andrew McIntyre commented on DERBY-1141:
----------------------------------------

Committed patch 20060512 with revision 407637. Leaving this open in case anyone else wants to work on it further.

> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat, DERBY-1141_20060424.diff, DERBY-1141_20060424.stat, DERBY-1141_20060512.diff, JUnit_useprocessFalse_v1.diff
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1141?page=all ]
     
Andrew McIntyre resolved DERBY-1141:
------------------------------------

    Fix Version: 10.2.0.0
     Resolution: Fixed
     Derby Info:   (was: [Patch Available])

ok, marking this resolved then. can be reopened later if anyone wants to continue work on it.

> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat, DERBY-1141_20060424.diff, DERBY-1141_20060424.stat, DERBY-1141_20060512.diff, JUnit_useprocessFalse_v1.diff
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1141?page=all ]

Myrna van Lunteren updated DERBY-1141:
--------------------------------------

    Attachment: DERBY-1141_20060424.stat
                DERBY-1141_20060424.diff

Attached is an updated patch - DERBY-1141_20060424.*

Differences between the previous version and this one are: 
- junit changes suggested are incorporated
- actually making the security manager not installed message that showed up with DerbyNet in the output not show up anymore. The previous effort tried to do so, but actually failed
- fixed mistakes in logic that caused regression of 3 tools tests.
- attempted to improve the comments

I ran derbyall with jdk14 with sane jars and only encountered the same diffs that I've been seeing with this environment regardless of any changes (sysinfo*, wisconsin, runtimeinfo).
Also ran derbynetclientmats, derbynetmats, jdbcapi, jdk14, jdbc20 with -Duseprocess=false. derbynetclientmats was having mixed results, sometimes one test would have trouble connecting, sometimes another. 
But at least the suite runs, which it didn't do before this patch.

All in all, I think this patch is now good to get checked in, noting that there is still room for further improvement, but it's as far as I intend to take it for this JIRA issue.

> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat, DERBY-1141_20060424.diff, DERBY-1141_20060424.stat, JUnit_useprocessFalse_v1.diff
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1141?page=comments#action_12374941 ] 

John H. Embretsen commented on DERBY-1141:
------------------------------------------

I think it is a good thing getting more tests/suites to run with useprocess=false, as this may improve running time and help debugging, among other things. So I definitely think this work has value for the Derby community.

I have not studied in detail all aspects of 'DERBY-1141_20060413.diff' (henceforth "the patch"), but I have a couple of minor comments - mostly comments about the comments, actually...


Starting/stopping network server:
-----------------------------------------------------------

I don't think it is clear from the comments in the patch in which cases the network server is started or stopped, or not - and the reason for doing so. 

For example, in RunList.java the patch adds:

+        // If useprocess is false, and this is a networkserver test,
+        // make sure we shutdown network server

I think it would be good to include a comment on _why_ we have to make sure to shut down the network server.

In RunTest.java (main()) the patch adds:

+            // if this is a suite, and we're using useprocess, actually don't need
+            // to start networkserver if it's running
+            if ((!useprocess) && (isSuiteRun))
+            {

It is probably a good idea to be consistent when referring to the useprocess flag. For example, I don't think it is clear what "we're using useprocess" actually means.
I see from the code that what is meant is useprocess=false, while I would interpret "using useprocess" as useprocess=true. Please include "true" or "false" when referring
to a specific value of the useprocess flag.

Here (in the same part of the patch) I also think it would be nice to include short comments about why (or why not) the server is started or stopped, although this may be derived from the code and older comments elsewhere in RunTest.java. The test harness is hard enough to understand as it is, so more and better comments are always appreciated (by me, at least).


JUnit and useprocess=false:
----------------------------------------------------

Some may be surprised to find that junit tests are run in a separate process by default (instead of being skipped) when useprocess=false. However, I think I see some advantages of doing it this way, so I accept (a bit reluctantly, perhaps) this behavior for now.

In the patch I also find:

-        if ( useprocess )
+	    // Always create a process if testType is junit, otherwise testRunner
+	    // would exit a suite prematurely, and we can't debug that anyway and
+	    // they should run quick anyway.
+        if ( useprocess || (!useprocess && testType.equals("junit")))

I'm not sure I understand/remember exactly why junit tests cannot be run with useprocess=false (i.e. why "testRunner" (I assume this means junit.*ui.TestRunner) would exit a suite prematurely). Feel free to educate me on this subject (otherwise I guess I'll look into it myself when time permits) ;)


> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1141?page=all ]
     
Myrna van Lunteren closed DERBY-1141:
-------------------------------------


> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat, DERBY-1141_20060424.diff, DERBY-1141_20060424.stat, DERBY-1141_20060512.diff, JUnit_useprocessFalse_v1.diff
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1141?page=all ]

John H. Embretsen updated DERBY-1141:
-------------------------------------

    Attachment: JUnit_useprocessFalse_v1.diff

Attaching 'JUnit_useprocessFalse_v1.diff'

This patch is _not_ ready for commit (I have not tested it thoroughly, and it will probably cause merge conflicts with Myrna's ongoing work in this area); it merely demonstrates a way to run junit type tests with useprocess=false, without using a custom TestRunner, as discussed in the following thread on derby-dev:

http://www.nabble.com/-jira-Created%3A-%28DERBY-1141%29-test-harness-usage-of-useprocess-needs-improvement-t1325698.html

I have only run the jdbcapi suite, which contains various junit tests that with the current trunk do not run with useprocess=false. With this patch, jdbcapi_report.txt reports:

Test Run Started: 2006-04-21 16:40:51.0
Test Run Duration: 00:09:41

25 Tests Run
100% Pass (25 tests passed)
 0% Fail (0 tests failed)
0 Suites skipped

With useprocess=true, 26 tests are run (passing), and duration is 00:12:49. The test that was skipped when useprocess=false was jdbcapi/bestrowidentifier.sql (listed in exclude file), which on my machine takes about 20 seconds to run when useprocess=true. So I suppose useprocess=false cuts 2-3 minutes (~20%) in running time for the jdbcapi suite.



> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat, JUnit_useprocessFalse_v1.diff
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1141?page=all ]

Myrna van Lunteren updated DERBY-1141:
--------------------------------------

    Attachment: DERBY-1141_20060512.diff

This patch - DERBY-1141_20060512.diff - touches the same files as DERBY-1141_20060424.*.
The differences are:
1. more tests have gotten excluded. 
    This is not good, but I am unable to explain a lot of these failures and all in all, that's not the point of this patch...
    For instance, I hit a failure in a new test (blobTest8Trigger) where a generated file in wombat/tmp could not be found. I think that's possibly a genuine bug, and I should investigate that separately.
    Other failures seem to show up because of different FilePermissions with the useprocess=false, which makes sense but is also something that can be looked at later.

2. I addressed item 1 and 3 from John's comments and took the suggestions



> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat, DERBY-1141_20060424.diff, DERBY-1141_20060424.stat, DERBY-1141_20060512.diff, JUnit_useprocessFalse_v1.diff
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1141?page=comments#action_12383370 ] 

Myrna van Lunteren commented on DERBY-1141:
-------------------------------------------

Re the 2nd comment from John, after poking the code, it seems to me the *skip* files were only implemented for skipping of suites, not individual tests.
It's not limited to useprocess=false, so I decided this would not be the place to attempt to address it.

To implement it, I think something can be added in RunTest.main, in the 'else' block of the call to testRun(propString, sp).

> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat, DERBY-1141_20060424.diff, DERBY-1141_20060424.stat, DERBY-1141_20060512.diff, JUnit_useprocessFalse_v1.diff
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1141?page=comments#action_12376272 ] 

John H. Embretsen commented on DERBY-1141:
------------------------------------------

Comments on patch DERBY-1141_20060424.diff:

Myrna, 
Most of it looks good; very good code comments this time :) 
Also, thanks for including my proposed solution for JUnit tests.

That said, I still want to comment on a couple of issues:

1)  

RunTest.java, @@ -291,9 +296,41 @@:

I appreciate the detailed comments here. However, the patch adds:

+            if ((!useprocess) && (isSuiteRun))
+            {
+                boolean started = false;
+                try 
+                {
+                    started = ns.testNetworkServerConnection();
+                }
+                catch (Exception e) {} // ignore
+                if (!started)
+                    ns.start(); // start but don't stop, so not setting serverNeedsStopping
+                if (started && !startServer)
+                    ns.stop();
+            }

What if the server has not been started (i.e. started = false), and startServer = false? Won't the server be started anyway in this case?
In other words, with this code the following happens (as far as I understand it):

1. The network server is started, regardless of the value of the startServer variable.
2. If startServer = false (i.e., the harness is instructed not to start the server), the server will be stopped if it was already running when executing the try block, but it will not be stopped if it was started within the if construct following the catch block.

Here is what I suggest to make this work as intended:

+                if (!started && startServer)
+                    ns.start(); // start but don't stop, so not setting serverNeedsStopping
+                if (started && !startServer)
+                    ns.stop();


2) 

I tried running the jdbcapi suite (jdk1.4 and 1.5) with useprocess=false, but the SUR*.junit tests failed with NullPointerExceptions. I tried applying the patch to SVN revision 395093. There may be something wrong in my environment if it works for you with this revision or a later one...

Also, when I run the jdbcapi suite with useprocess=false the harness notifies me (via the console output) that bestrowidentifier.sql was skipped. However, this test is not listed in jdbcapi.skip or jdbcapi_skip.txt. Myrna, do you know how to fix this?


3) 

I think the following comment in the *Useprocess.exclude files is invalid in this version of the patch:

+# note: junit tests automatically switch to useprocess=true


> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat, DERBY-1141_20060424.diff, DERBY-1141_20060424.stat, JUnit_useprocessFalse_v1.diff
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1141?page=all ]

Myrna van Lunteren updated DERBY-1141:
--------------------------------------

    Attachment: DERBY-1141_20060413.stat
                DERBY-1141_20060413.diff

Here is a patch that allows one to run other suites than nist, especially tests using networkserver, to run with useprocess=false.

There are various issues, and I have not tested all suites...
- I have only tested derbynetclientmats, derbynetmats,  jdbcapi, jdbc20, jdk14, multi. 
- my last test run was a while ago, any new tests might cause failures...
- tests that failed when run those suites with useprocess=false are listed in <framework>Useprocess.exclude files in the functionTests/suites dir. Tests will get skipped when they're run in a suite && useprocess==false && they're listed in the matching <framework>Useprocess.exclude file.
- the useprocess results in a different location for some files, as a result, a number of tests that depend on the 'normal' process will fail. 
- tests use the same database, so if they don't run clean, subsequent tests will fail. 
- none of the junit tests work with useprocess false.

On the positive side:
- the suites do run faster...(even ignoring the fact that quite a few tests get excluded especially for Derby client).
- the using of the same database is similar to how the RemoteServer testing works, and thus, running things this way makes the maintenance for that setup a less lonely experience.  (  :-)  )
- this patch did coincidentally fix Mike's report of failure with -Doutput.
- this patch in passing stops the harness from setting user.dir. (https://issues.apache.org/jira/browse/DERBY-577)

I had at one point separate suites of tests that worked with useprocess and not, but I found it got to be too confusing, with too many suites...

One change to note in this is that networkserver does not get stopped and started for every test if useprocess=false. 

This is a work in progress, I'd like to get feedback on whether folks see this as a worthwhile thing to have...



> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1141?page=all ]

Myrna van Lunteren updated DERBY-1141:
--------------------------------------

    Derby Info: [Patch Available]

> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-1141) test harness usage of useprocess needs improvement

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1141?page=comments#action_12412569 ] 

Myrna van Lunteren commented on DERBY-1141:
-------------------------------------------

I would propose to close this issue, with the comment that if someone wants to work further on it, they can reopen it. Otherwise this may stay open for... a very long time.

> test harness usage of useprocess needs improvement
> --------------------------------------------------
>
>          Key: DERBY-1141
>          URL: http://issues.apache.org/jira/browse/DERBY-1141
>      Project: Derby
>         Type: Improvement

>   Components: Test
>     Reporter: Myrna van Lunteren
>     Assignee: Myrna van Lunteren
>  Attachments: DERBY-1141_20060413.diff, DERBY-1141_20060413.stat, DERBY-1141_20060424.diff, DERBY-1141_20060424.stat, DERBY-1141_20060512.diff, JUnit_useprocessFalse_v1.diff
>
> The 'old' functionTests harness has property useprocess, which, when set to false, causes tests within a suite to run from within one jvm, thus creating databases and files in the same directory.
> This functionality is useful for debugging test runs within an IDE.
> Also, it is potentially useful for speeding up testruns.
> However, currently, there are some problems and shortcomings of this functionality.
> - For instance, when running a networkserver test with framework DerbyNet of type .java one sees the message 'Security Manager not installed' show up within the test output, thus causing the test to fail.
> - running derbynet(client)mats suite with useprocess=false doesn't actually make things any faster,  because networkserver gets started fresh for every test. 
>   However, it should be feasible to start networkserver with the first test in a suite, then use that 
>   networkserver  for subsequent tests and shutdown networkserver when the suite finishes.
> - Also, (reported by Mike Matrigali off-list) currently, the following:
> ------------------
> java -Duseprocess=false -Doutputdir=<snippeddirname>/newout  -Dkeepfiles=true org.apache.derbyTesting.functionTests.harness.RunTest lang/closed.java
> ------------------
> makes the test fall out of the harness with: Exception in thread "main"
> and in the .tmp:
> ------------------
> java.security.AccessControlException: access denied (java.io.FilePermission <snippeddirname>\newout read)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
>         at java.io.File.exists(File.java:678)
>         at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:360)
>         at java.io.File.getCanonicalPath(File.java:513)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.execTestNoProcess(RunTest.java:2370)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.testRun(RunTest.java:443)
>         at org.apache.derbyTesting.functionTests.harness.RunTest.main(RunTest.java:302)
> --------------------------------
>   removing the -Doutputdir gets around that problem, but shouldn't be needed.
> - there is the reference http://www.nabble.com/AccessControlException-when-running-functional-tests-t1321374.html#a3526947
>   I couldn't duplicate this yet, maybe more info to follow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira