Hi,

When running suites.All in the 10.2 branch, a lot of tests fails and eventually the run is aborted if no derby.system.home is specified:
Tests run: 95,  Failures: 0,  Errors: 137

This annoys me, and the patch to fix the problem(s) is simple (I attached a suggested patch). The work-around is also simple, but if no objections are raised, I'd like to get the patch committed.

I assume there are no plans to merge all the work done on JUnit infrastructure and the tests themselves to 10.2. The patch only includes changes already made in trunk, but merging the original patches touches a lot more files and might case trouble due to functional/interface changes. The suggested patch also fixes another trivial bug, where a missing file separator causes a security exception (no matching entry in the policy file).

I still see some errors when suites.All is run to completion, and I'd also like to clean these up:
Tests run: 1756,  Failures: 3,  Errors: 1

(testGrantRevokeWithoutSQLAuthProperty
 testCurrentTime
 testInertTime
 grantRevokeAfterSettingSQLAuthProperty)

If these tests cannot be easily fixed, I suggest we disable them for 10.2.



--
Kristian
Index: java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
===================================================================
--- java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java      
(revisjon 476826)
+++ java/testing/org/apache/derbyTesting/junit/NetworkServerTestSetup.java      
(arbeidskopi)
@@ -21,6 +21,7 @@
 
 import java.io.FileNotFoundException;
 import java.net.InetAddress;
+import java.io.File;
 import java.io.FileOutputStream;
 import java.io.PrintWriter;
 import java.security.AccessController;
@@ -65,11 +66,12 @@
             serverOutput = (FileOutputStream)
             AccessController.doPrivileged(new PrivilegedAction() {
                 public Object run() {
-                    String fileName = System.getProperty("derby.system.home") 
+ 
-                            "serverConsoleOutput.log";
+                    File logs = new File("logs");
+                    logs.mkdir();
+                    File console = new File(logs, "serverConsoleOutput.log");
                     FileOutputStream fos = null;
                     try {
-                        fos = (new FileOutputStream(fileName));
+                        fos = new FileOutputStream(console.getPath(), true);
                     } catch (FileNotFoundException ex) {
                         ex.printStackTrace();
                     }
Index: java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
===================================================================
--- java/testing/org/apache/derbyTesting/junit/TestConfiguration.java   
(revisjon 476826)
+++ java/testing/org/apache/derbyTesting/junit/TestConfiguration.java   
(arbeidskopi)
@@ -110,9 +110,6 @@
         if (BaseTestCase.getSystemProperty("derby.system.home") != null)
             assumeHarness = true;
         
-        // for now always assume harness - still testing this code
-        assumeHarness = true;
-
         DEFAULT_CONFIG = assumeHarness ? DERBY_HARNESS_CONFIG : JUNIT_CONFIG;
         runningInDerbyHarness = assumeHarness;
         

Reply via email to