db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1142052 - in /db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests: Changes10_8_2.java UpgradeChange.java UpgradeRun.java
Date Fri, 01 Jul 2011 19:56:07 GMT
Author: rhillegas
Date: Fri Jul  1 19:56:06 2011
New Revision: 1142052

URL: http://svn.apache.org/viewvc?rev=1142052&view=rev
Log:
DERBY-4437: Port 1142013 from trunk to 10.8 branch.

Added:
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_8_2.java
      - copied, changed from r1142013, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_8_2.java
Modified:
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeChange.java
    db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java

Copied: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_8_2.java
(from r1142013, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_8_2.java)
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_8_2.java?p2=db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_8_2.java&p1=db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_8_2.java&r1=1142013&r2=1142052&rev=1142052&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_8_2.java
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_8_2.java
Fri Jul  1 19:56:06 2011
@@ -128,7 +128,7 @@ public class Changes10_8_2 extends Upgra
 
             if ( supportsSequences )
             {
-                vetSequenceValue( s, "seq1_4437", -2147483647, -2147483627 );
+                vetSequenceValue( s, "seq1_4437", -2147483643, -2147483623 );
             
                 s.execute( "create sequence seq2_4437" );
                 vetSequenceValue( s, "seq2_4437", -2147483648, -2147483628 );
@@ -145,7 +145,7 @@ public class Changes10_8_2 extends Upgra
 
             if ( supportsSequences )
             {
-                vetSequenceValue( s, "seq1_4437", -2147483646, -2147483641 );
+                vetSequenceValue( s, "seq1_4437", -2147483642, -2147483637 );
                 vetSequenceValue( s, "seq2_4437", -2147483647, -2147483642 );
             }
             
@@ -160,7 +160,7 @@ public class Changes10_8_2 extends Upgra
 
             if ( supportsSequences )
             {
-                vetSequenceValue( s, "seq1_4437", -2147483641, -2147483621 );
+                vetSequenceValue( s, "seq1_4437", -2147483637, -2147483617 );
                 vetSequenceValue( s, "seq2_4437", -2147483642, -2147483622 );
             }
             

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeChange.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeChange.java?rev=1142052&r1=1142051&r2=1142052&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeChange.java
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeChange.java
Fri Jul  1 19:56:06 2011
@@ -178,5 +178,21 @@ abstract class UpgradeChange extends Bas
     {
         return (getOldMajor() == requiredMajor)
           && (getOldMinor() == requiredMinor);
-     } 
+     }
+    
+    /**
+     * Pretty-print the phase.
+     */
+    String  getPhaseString()
+    {
+        return PHASES[ getPhase() ];
+    }
+
+    /**
+     * Pretty-print the original version number.
+     */
+    String  getOldVersionString()
+    {
+        return "( " + getOldMajor() + ", " + getOldMinor() + ", " + getOldFixPack() + ",
" + getOldPoint() + " )";
+    }
 }

Modified: db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java?rev=1142052&r1=1142051&r2=1142052&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
(original)
+++ db/derby/code/branches/10.8/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
Fri Jul  1 19:56:06 2011
@@ -195,6 +195,8 @@ class UpgradeRun extends UpgradeClassLoa
                 	suite.addTest(Changes10_6.suite(phase));
                 if (oldMinor < 7)
                 	suite.addTest(Changes10_7.suite(phase));
+                if ( lessThan( version, new int[] { 10, 8, 1, 6 } ) )
+                { suite.addTest(Changes10_8_2.suite(phase)); }
             }
             
             // Add DatabaseMetaData tests. Since metadata
@@ -237,6 +239,21 @@ class UpgradeRun extends UpgradeClassLoa
         return TestConfiguration.connectionDSDecorator(suite);
     }
     
+    /**
+     * Return true if and only if the left version is less than the
+     * right version.
+     */
+    private static boolean lessThan( int[] left, int[] right )
+    {
+        for (int i = 0; i < left.length; i++)
+        {
+            if ( left[ i ] < right[ i ] ) return true;
+            if ( left[ i ] > right[ i ] ) return false;
+        }
+
+        // Versions match exactly. That is, not less than.
+        return false;
+    } 
     
     /**
      * When running against certains old releases in Java SE 6



Mime
View raw message