db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1055169 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests: OldVersions.java PhaseChanger.java _Suite.java
Date Tue, 04 Jan 2011 20:06:31 GMT
Author: kmarsden
Date: Tue Jan  4 20:06:31 2011
New Revision: 1055169

URL: http://svn.apache.org/viewvc?rev=1055169&view=rev
Log:
DERBY-4913 10.3 to 10.5 upgrade fails with ava.io.StreamCorruptedException: java.lang.ClassCastException:
org.apache.derby.catalog.types.OldRoutineType incompatible with org.apache.derby.iapi.types.DataTypeDescriptor

Change test to check the actual 10.3.3.0 version for specifying the create attribute instead
of just using an array offset.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/OldVersions.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.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/OldVersions.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/OldVersions.java?rev=1055169&r1=1055168&r2=1055169&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/OldVersions.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/OldVersions.java
Tue Jan  4 20:06:31 2011
@@ -57,7 +57,7 @@ public class OldVersions
     //Constant for special upgrade testing with both upgrade and create 
     // set. We just test this with one version in the interest of time
     // DERBY-4913
-    public static int VERSION_10_3_3_0_OFFSET = 7;
+    public static int[] VERSION_10_3_3_0=  new int[] {10,3,3,0};
     /**
      * <p>
      * Get an array of versions supported by this platform.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.java?rev=1055169&r1=1055168&r2=1055169&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.java
Tue Jan  4 20:06:31 2011
@@ -79,6 +79,9 @@ final class PhaseChanger extends BaseTes
                     + "." +  ((int[]) UpgradeChange.oldVersion.get())[3];
             BaseTestCase.traceit("Test upgrade from: " + versStr + ", phase: " 
                     + UpgradeChange.PHASES[phase]);
+            if (UpgradeChange.PHASES[phase].equals("UPGRADE")) {
+                BaseTestCase.traceit("Upgrade attributes = " + upgradeAttributes);
+            }
         }
         
         if (loader != 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=1055169&r1=1055168&r2=1055169&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
Tue Jan  4 20:06:31 2011
@@ -20,6 +20,8 @@ limitations under the License.
 */
 package org.apache.derbyTesting.functionTests.tests.upgradeTests;
 
+import java.util.Arrays;
+
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
@@ -132,7 +134,7 @@ public class _Suite extends BaseTestCase
         for (int i = 0; i < old.length; i++) {
             // DERBY-4913. Test upgrade and create together for 10.3.3.0 since
             // that combination seems to trigger a different code path.
-            if (i == OldVersions.VERSION_10_3_3_0_OFFSET)
+            if (Arrays.equals(old[i],OldVersions.VERSION_10_3_3_0))
                 suite.addTest(UpgradeRun.suite(old[i], true));
             else
                 suite.addTest(UpgradeRun.suite(old[i], false));



Mime
View raw message