[jboss-cvs] JBossAS SVN: r84831 - in branches/Branch_5_x/testsuite: src/etc/serialVersionUID and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 26 17:13:36 EST 2009


Author: smcgowan at redhat.com
Date: 2009-02-26 17:13:35 -0500 (Thu, 26 Feb 2009)
New Revision: 84831

Added:
   branches/Branch_5_x/testsuite/src/etc/serialVersionUID/500.ser
Modified:
   branches/Branch_5_x/testsuite/build.xml
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java
Log:
JBAS-6501 - merge SerialVersionUIDUnitTestCase changes

Modified: branches/Branch_5_x/testsuite/build.xml
===================================================================
--- branches/Branch_5_x/testsuite/build.xml	2009-02-26 21:49:23 UTC (rev 84830)
+++ branches/Branch_5_x/testsuite/build.xml	2009-02-26 22:13:35 UTC (rev 84831)
@@ -1992,6 +1992,7 @@
       <sysproperty key="build.testlog" value="${build.testlog}"/>
       <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
       <sysproperty key="jboss.aop.path" file="${source.resources}/cache/standalone/META-INF/jboss-aop.xml"/>
+      <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed"/>
       <!-- Pass along any jbosstest.* system properties -->
       <syspropertyset>
         <propertyref prefix="jbosstest."/>

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


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

Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java	2009-02-26 21:49:23 UTC (rev 84830)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java	2009-02-26 22:13:35 UTC (rev 84831)
@@ -59,21 +59,36 @@
    {
       // The packages in jboss-4.2.3 with known serialization issues
       String[] badPackages = {
-	// Ignore org.apache.* issues
-         "org.apache",
-	// Ignore jgroups issues
-         "org.jgroups",
-	//JBAS-5872 - serialVersionUID mismatches from 4.2.3.GA to be resolved
-	"org.jboss.aspects.versioned.StateManager",
-	"org.jboss.cache.CacheException",
-	"org.jboss.cache.Fqn",
-	"org.jboss.cache.Modification",
-	"org.jboss.cache.ReplicationException",
-	"org.jboss.logging.XLevel",
-	"org.jboss.mx.util.InstanceOfQueryExp",
-	"org.jboss.virtual.plugins.context.jar.NestedJarFromStream",
-	// Exclude due to mismatch when running with JDK 6
-	"javax.xml.ws.soap.SOAPFaultException"
+      "com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager",
+       // Ignore org.apache.* issues
+      "org.apache",
+      // Ignore hibernate issues
+      "org.hibernate",
+       // Ignore jgroups issues
+      "org.jgroups",
+       //JBAS-5872 - serialVersionUID mismatches from 4.2.3.GA to be resolved
+       "org.jboss.aspects.versioned.StateManager",
+       "org.jboss.cache.CacheException",
+       "org.jboss.cache.Fqn",
+       "org.jboss.cache.Modification",
+       "org.jboss.cache.ReplicationException",
+       "org.jboss.logging.XLevel",
+       "org.jboss.mx.util.InstanceOfQueryExp",
+       "org.jboss.virtual.plugins.context.jar.NestedJarFromStream",
+       "org.jboss.console",
+       "org.jboss.ejb3.stateful.StatefulBeanContextReference",
+       "org.jboss.iiop",
+       "org.jboss.security.NestableGroup",
+       "org.jboss.security.NestablePrincipal",
+       "org.jboss.tm.iiop._TransactionServiceStub",
+       "org.jboss.wsf",
+       // other
+       "javax.xml.registry.JAXRException",
+       "javax.xml.registry.RegistryException",
+       // lib/endorsed/stax-api.jar
+       "javax.xml.namespace.QName",
+       // JBAS-6434
+       "org.jboss.ws.metadata.wsdl.Extendable"
       };
 
       System.out.println("+++ test423Compatibility");
@@ -85,7 +100,6 @@
       Map classInfoMap = (Map) ois.readObject();
       System.out.println("4.2.3 serial classes count: "+classInfoMap.size());
 
-      System.setProperty("org.jboss.j2ee.LegacySerialization", "true");
       Map currentClassInfoMap = calcClassInfoMap();
       int mismatchCount = compare(classInfoMap, currentClassInfoMap, "423", badPackages);
       currentClassInfoMap.clear();
@@ -94,6 +108,55 @@
          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 = {
+      "org.apache.catalina",
+      "org.jboss.classloading.spi.dependency.Module",
+      "org.jboss.console",
+      // those were changed to match 423 ids
+      "org.jboss.crypto.JBossSXProvider",
+      "org.jboss.metadata.rar.spec.JCA15MetaData",
+      "org.jboss.resource.adapter.jdbc.CachedPreparedStatement",
+      "org.jboss.resource.metadata.ConnectorMetaData",
+      "org.jboss.resource.metadata.DescriptionMetaDataContainer",
+      "org.jboss.security.SimplePrincipal",
+      "org.jboss.security.SubjectSecurityProxyFactory",
+      "org.jboss.services.binding.DuplicateServiceException",
+      // unclear if vfs classes are serialized to client
+      "org.jboss.virtual.plugins.context.vfs.AssembledDirectoryHandler",
+      "org.jboss.virtual.plugins.context.zip.ZipEntryHandler",
+      // ignore webservices framework classes
+      "org.jboss.wsf",
+      // lib/endorsed/stax-api.jar
+      "javax.xml.namespace.QName",
+      // JBAS-6434
+      "org.jboss.ws.metadata.wsdl.Extendable"
+      };
+
+      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());
+
+      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
     */
@@ -197,6 +260,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