db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1132648 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility: CompatibilityCombinations.java README.html
Date Mon, 06 Jun 2011 14:04:48 GMT
Author: kahatlen
Date: Mon Jun  6 14:04:48 2011
New Revision: 1132648

URL: http://svn.apache.org/viewvc?rev=1132648&view=rev
Log:
DERBY-5145: Provide option to limit compatibility test to combinations that include trunk

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/README.html

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java?rev=1132648&r1=1132647&r2=1132648&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/CompatibilityCombinations.java
Mon Jun  6 14:04:48 2011
@@ -218,6 +218,11 @@ public class CompatibilityCombinations e
     private final static String networkServerControl = "org.apache.derby.drda.NetworkServerControl";
     private       static String specialTestingJar = null;
                                 // None null if using e.g. your own modified tests.
+    /**
+     * Only test the combinations that include the latest version if this
+     * flag is true.
+     */
+    private       static boolean latestOnly;
     private       static String singleClient = null;
                                 // Integer string property specifying which Derby version
to use for client.
     private       static String singleClientVM = null;
@@ -477,6 +482,7 @@ public class CompatibilityCombinations e
      * The number of combinations can be restricted by specifying the
      * properties
      * <ul>
+     *    <li> test.latestOnly
      *    <li> test.singleServer
      *    <li> test.singleServerVM
      *    <li> test.singleClient
@@ -569,6 +575,16 @@ public class CompatibilityCombinations e
                 {
                     int clientVersionLow = 0;
                     int clientVersionHigh = derbyLib.length-1;
+
+                    if (latestOnly && serverVersion != clientVersionHigh)
+                    {
+                        // We only want to test combinations that include the
+                        // latest Derby version (typically trunk). If the
+                        // server is not at the latest version, we only need
+                        // to test it against the latest client version.
+                        clientVersionLow = clientVersionHigh;
+                    }
+
                     if ( singleClient != null )
                     {
                         clientVersionLow = Integer.parseInt(singleClient);
@@ -804,6 +820,7 @@ public class CompatibilityCombinations e
      *     <li>test.showSysinfo 
      *     <li>test.serverPort 
      *     <li>test.includeUpgrade 
+     *     <li>test.latestOnly
      *     <li>test.singleClient 
      *     <li>test.singleClientVM 
      *     <li>test.singleServer 
@@ -867,7 +884,11 @@ public class CompatibilityCombinations e
 
         includeUpgrade = cp.getProperty("test.includeUpgrade","false").equalsIgnoreCase("true");
         System.out.println("includeUpgrade: " + includeUpgrade);
-      
+
+        latestOnly =
+            cp.getProperty("test.latestOnly", "false").equalsIgnoreCase("true");
+        System.out.println("latestOnly: " + latestOnly);
+
         singleClient = cp.getProperty("test.singleClient",null); // E.g. 5 for derby.version5,
see property file
         System.out.println("singleClient: " + singleClient);
         

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/README.html
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/README.html?rev=1132648&r1=1132647&r2=1132648&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/README.html
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/README.html
Mon Jun  6 14:04:48 2011
@@ -275,6 +275,12 @@ db2jcc_lib=/opt/db2jcc/lib
 ## test.singleServer=3
 ## test.singleServerVM=1
 ##
+## Test only combinations that use the latest Derby version either on
+## the server side or on the client side (assuming the derby.versionN
+## property with the highest N points to the latest version):
+##
+## test.latestOnly=true
+##
 
 </pre></blockquote>
 



Mime
View raw message