db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r617236 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests: UpgradeRun.java _Suite.java
Date Thu, 31 Jan 2008 20:56:48 GMT
Author: djd
Date: Thu Jan 31 12:56:45 2008
New Revision: 617236

URL: http://svn.apache.org/viewvc?rev=617236&view=rev
Log:
Add the setting of derbyTesting.oldReleasePath to the name of the top-level suite returned
by upgradeTests._Suite.suite(). Allows a quick check to see if the property is being picked
up (if it isn't the tests run from the apache svn which can be slow).

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/_Suite.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java?rev=617236&r1=617235&r2=617236&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
Thu Jan 31 12:56:45 2008
@@ -79,6 +79,21 @@
         new AdditionalDb("ENCRYPT_10_2",  true),
         new AdditionalDb("ROLES_10_4", false)
     };
+    
+    static final String jarPath;
+    
+    static {
+        jarPath = (String ) AccessController.doPrivileged
+        (new java.security.PrivilegedAction(){
+
+            public Object run(){
+            return System.getProperty(_Suite.OLD_RELEASE_PATH_PROPERTY);
+
+            }
+
+        }
+         );
+    }
 
     private static String getTextVersion(int[] iv)
     {
@@ -257,7 +272,6 @@
      * @return location of jars of old release
      */
     private static String getOldJarLocation(int[] oldVersion) {
-        String jarPath = System.getProperty(_Suite.OLD_RELEASE_PATH_PROPERTY);
       
         if (jarPath == null || jarPath.length() == 0)
             return null;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/_Suite.java?rev=617236&r1=617235&r2=617236&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/_Suite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/_Suite.java
Thu Jan 31 12:56:45 2008
@@ -124,7 +124,8 @@
     
     public static Test suite() {
         
-        TestSuite suite = new TestSuite("Upgrade Suite");       
+        TestSuite suite = new TestSuite("Upgrade Suite: "
+                + OLD_RELEASE_PATH_PROPERTY + "=" + UpgradeRun.jarPath);       
 
         for (int i = 0; i < OLD_VERSIONS.length; i++) {
             // JSR169 support was only added with 10.1, so don't
@@ -133,7 +134,7 @@
                 (OLD_VERSIONS[i][0]==10) && (OLD_VERSIONS[i][1]==0)))
                 suite.addTest(UpgradeRun.suite(OLD_VERSIONS[i]));
         }
-        
+
         return suite;
     }
     



Mime
View raw message