[jboss-cvs] JBossAS SVN: r60545 - branches/Branch_4_2/testsuite/src/main/org/jboss/test/compatibility/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Feb 14 12:56:24 EST 2007
Author: rrajesh
Date: 2007-02-14 12:56:24 -0500 (Wed, 14 Feb 2007)
New Revision: 60545
Modified:
branches/Branch_4_2/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java
Log:
JBAS-3776 Added jboss 403SP1, 404 and 405 to SerialVersionUIDUnitTestCase
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java 2007-02-14 17:55:21 UTC (rev 60544)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/compatibility/test/SerialVersionUIDUnitTestCase.java 2007-02-14 17:56:24 UTC (rev 60545)
@@ -53,13 +53,150 @@
super(name);
}
+ /** Validate the 4.0.5 serial version uids against the current build
+ * @throws Exception
+ */
+ public void test405Compatibility()
+ throws Exception
+ {
+ // The packages in jboss-4.2.x with known 4.0.5 serialization issues
+ String[] badPackages = {
+ // Ignore javassist.* issues
+ "javassist",
+ /* The bundled javax.xml.namespace.QName is not compatible with the
+ jdk5/xerces 2.7.x version bundled with 4.0.3
+ */
+ "javax.xml.namespace.QName",
+ // Ignore org.apache.* issues
+ "org.apache",
+ // Ignore org.hibernate.* issues. Need to revist this.
+ "org.hibernate",
+ // Ignore jacorb packages org.omg.*
+ "org.omg",
+ };
+
+ System.out.println("+++ test405Compatibility");
+ // load the 4.0.5 serialVersionUID database
+ String etc = System.getProperty("jbosstest.src.etc", "../src/etc");
+ File serFile = new File(etc, "serialVersionUID/405.ser");
+ FileInputStream fis = new FileInputStream(serFile);
+ ObjectInputStream ois = new ObjectInputStream(fis);
+ Map classInfoMap = (Map) ois.readObject();
+ System.out.println("4.0.5 serial classes count: "+classInfoMap.size());
+ Map currentClassInfoMap = calcClassInfoMap();
+ StringBuffer bufferMessages = new StringBuffer();
+ int mismatchCount = compare(classInfoMap, currentClassInfoMap, "405", badPackages,bufferMessages );
+ currentClassInfoMap.clear();
+ System.out.println("serialVersionUID mismatches = "+mismatchCount);
+ if (mismatchCount!=0)
+ {
+ fail("Failures on SerialVersionComparisson:" + bufferMessages.toString());
+ }
+ }
+
+ /** Validate the 4.0.4 serial version uids against the current build
+ * @throws Exception
+ */
+ public void test404Compatibility()
+ throws Exception
+ {
+ // The packages in jboss-4.2.x with known 4.0.4 serialization issues
+ String[] badPackages = {
+ // Ignore javassist.* issues
+ "javassist",
+ /* The bundled javax.xml.namespace.QName is not compatible with the
+ jdk5/xerces 2.7.x version bundled with 4.0.3
+ */
+ "javax.xml.namespace.QName",
+ // Ignore org.apache.* issues
+ "org.apache",
+ // Ignore org.hibernate.* issues. Need to revist this.
+ "org.hibernate",
+ // Ignore jacorb packages org.jacorb.*, org.omg.*
+ "org.jacorb",
+ "org.omg",
+ // Ignore incompatible classes from the sun-javamail upgrade, JBAS-3488
+ "com.sun.mail.imap.protocol.IMAPAddress",
+ "javax.mail.MessagingException",
+ };
+
+ System.out.println("+++ test404Compatibility");
+ // load the 4.0.4 serialVersionUID database
+ String etc = System.getProperty("jbosstest.src.etc", "../src/etc");
+ File serFile = new File(etc, "serialVersionUID/404.ser");
+ FileInputStream fis = new FileInputStream(serFile);
+ ObjectInputStream ois = new ObjectInputStream(fis);
+ Map classInfoMap = (Map) ois.readObject();
+ System.out.println("4.0.4 serial classes count: "+classInfoMap.size());
+ Map currentClassInfoMap = calcClassInfoMap();
+ StringBuffer bufferMessages = new StringBuffer();
+ int mismatchCount = compare(classInfoMap, currentClassInfoMap, "404", badPackages,bufferMessages );
+ currentClassInfoMap.clear();
+ System.out.println("serialVersionUID mismatches = "+mismatchCount);
+ if (mismatchCount!=0)
+ {
+ fail("Failures on SerialVersionComparisson:" + bufferMessages.toString());
+ }
+ }
+
+ /** Validate the 4.0.3.SP1 serial version uids against the current build
+ * @throws Exception
+ */
+ public void test403SP1Compatibility()
+ throws Exception
+ {
+ // The packages in jboss-4.2.x with known 4.0.3.SP1 serialization issues
+ String[] badPackages = {
+ // Ignore antlr.* issues. TODO look into exception proagation
+ "antlr",
+ // Ignore javassist.* issues
+ "javassist",
+ /* The bundled javax.xml.namespace.QName is not compatible with the
+ jdk5/xerces 2.7.x version bundled with 4.0.3
+ */
+ "javax.xml.namespace.QName",
+ // Ignore org.apache.* issues
+ "org.apache",
+ // Ignore org.hibernate.* issues. Need to revist this.
+ "org.hibernate",
+ // Ignore jacorb packages org.jacorb.*, org.omg.*
+ "org.jacorb",
+ "org.omg",
+ // The aop classes were not finalized until 4.0.3
+ "org.jboss.aop",
+ // Ignore incompatible classes from the sun-javamail upgrade, JBAS-3488
+ "com.sun.mail.imap.protocol.IMAPAddress",
+ "javax.mail.MessagingException",
+ // JBAS-3736, jaxen-1.1-beta9 has different serialVersionUIDs than beta4
+ "org.jaxen"
+ };
+
+ System.out.println("+++ test403SP1Compatibility");
+ // load the 4.0.3.SP1 serialVersionUID database
+ String etc = System.getProperty("jbosstest.src.etc", "../src/etc");
+ File serFile = new File(etc, "serialVersionUID/403SP1.ser");
+ FileInputStream fis = new FileInputStream(serFile);
+ ObjectInputStream ois = new ObjectInputStream(fis);
+ Map classInfoMap = (Map) ois.readObject();
+ System.out.println("4.0.3.SP1 serial classes count: "+classInfoMap.size());
+ Map currentClassInfoMap = calcClassInfoMap();
+ StringBuffer bufferMessages = new StringBuffer();
+ int mismatchCount = compare(classInfoMap, currentClassInfoMap, "403SP1", badPackages,bufferMessages );
+ currentClassInfoMap.clear();
+ System.out.println("serialVersionUID mismatches = "+mismatchCount);
+ if (mismatchCount!=0)
+ {
+ fail("Failures on SerialVersionComparisson:" + bufferMessages.toString());
+ }
+ }
+
/** Validate the 4.0.2 serial version uids against the current build
* @throws Exception
*/
public void test402Compatibility()
throws Exception
{
- // The packages in jboss-4.0.x with known 4.0.1 serialization issues
+ // The packages in jboss-4.2.x with known 4.0.1 serialization issues
String[] badPackages = {
// Ignore antlr.* issues. TODO look into exception proagation
"antlr",
@@ -127,7 +264,7 @@
public void test401Compatibility()
throws Exception
{
- // The packages in jboss-4.0.x with known 4.0.1 serialization issues
+ // The packages in jboss-4.2.x with known 4.0.1 serialization issues
String[] badPackages = {
// Ignore javassist.* issues
"javassist",
@@ -303,6 +440,9 @@
// JBAS-3600, the execution order of tests in this test case is important
// so it must be defined explicitly when running under some JVMs
TestSuite suite = new TestSuite();
+ suite.addTest(new SerialVersionUIDUnitTestCase("test405Compatibility"));
+ suite.addTest(new SerialVersionUIDUnitTestCase("test404Compatibility"));
+ suite.addTest(new SerialVersionUIDUnitTestCase("test403SP1Compatibility"));
suite.addTest(new SerialVersionUIDUnitTestCase("test402Compatibility"));
suite.addTest(new SerialVersionUIDUnitTestCase("test401Compatibility"));
suite.addTest(new SerialVersionUIDUnitTestCase("testJ2EERI141Compatibility"));
@@ -315,3 +455,4 @@
junit.textui.TestRunner.run(SerialVersionUIDUnitTestCase.class);
}
}
+
More information about the jboss-cvs-commits
mailing list