[jboss-cvs] JBossAS SVN: r84307 - in branches/Branch_5_0/testsuite/src: main/org/jboss/test/compatibility/test and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 17 08:50:43 EST 2009


Author: smcgowan at redhat.com
Date: 2009-02-17 08:50:42 -0500 (Tue, 17 Feb 2009)
New Revision: 84307

Added:
   branches/Branch_5_0/testsuite/src/etc/serialVersionUID/500.ser
Modified:
   branches/Branch_5_0/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java
Log:
JBAS-6501 - add 5.0.0.GA ser file and test

Added: branches/Branch_5_0/testsuite/src/etc/serialVersionUID/500.ser
===================================================================
(Binary files differ)


Property changes on: branches/Branch_5_0/testsuite/src/etc/serialVersionUID/500.ser
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: branches/Branch_5_0/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java
===================================================================
--- branches/Branch_5_0/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java	2009-02-17 13:49:02 UTC (rev 84306)
+++ branches/Branch_5_0/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java	2009-02-17 13:50:42 UTC (rev 84307)
@@ -106,6 +106,37 @@
          mismatchCount == 0);
    }
 
+
+   /** Validate the 5.0.0.GA serial version uids against the current build
+    * @throws Exception
+    */
+   public void test500Compatibility()
+         throws Exception
+   {
+      // The packages in jboss-5.0.0 with known serialization issues
+      String[] badPackages = {
+	// No Excludes for initial run
+      };
+
+      System.out.println("+++ test500Compatibility");
+      // load the 5.0.0 serialVersionUID database
+      String etc = System.getProperty("jbosstest.src.etc", "../src/etc");
+      File serFile = new File(etc, "serialVersionUID/500.ser");
+      FileInputStream fis = new FileInputStream(serFile);
+      ObjectInputStream ois = new ObjectInputStream(fis);
+      Map classInfoMap = (Map) ois.readObject();
+      System.out.println("5.0.0 serial classes count: "+classInfoMap.size());
+
+      //System.setProperty("org.jboss.j2ee.LegacySerialization", "true");
+      Map currentClassInfoMap = calcClassInfoMap();
+      int mismatchCount = compare(classInfoMap, currentClassInfoMap, "500", badPackages);
+      currentClassInfoMap.clear();
+      System.out.println("serialVersionUID mismatches = "+mismatchCount);
+      assertTrue("There are no serialVersionUID mismatches("+mismatchCount+")",
+         mismatchCount == 0);
+   }
+
+
    /** Validate the JavaEE 5.0 RI serial version uids against the current build
     * @throws Exception
     */
@@ -209,6 +240,7 @@
       // so it must be defined explicitly when running under some JVMs
       TestSuite suite = new TestSuite();
       suite.addTest(new SerialVersionUIDUnitTestCase("test423Compatibility"));
+      suite.addTest(new SerialVersionUIDUnitTestCase("test500Compatibility"));
       //suite.addTest(new SerialVersionUIDUnitTestCase("testJavaEE50Compatibility"));
 
       return suite;




More information about the jboss-cvs-commits mailing list