[jboss-cvs] JBossAS SVN: r81617 - trunk/testsuite/src/main/org/jboss/test/jmx/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 26 06:52:58 EST 2008


Author: dimitris at jboss.org
Date: 2008-11-26 06:52:58 -0500 (Wed, 26 Nov 2008)
New Revision: 81617

Modified:
   trunk/testsuite/src/main/org/jboss/test/jmx/test/UndeployBrokenPackageUnitTestCase.java
Log:
JBAS-5953, conditionally delay this test on Sun 1.6 JVM
The deployed jar is still used by VFS that keeps files open for a while
and overwriting the jar on this particular VM combination causes crashes

Modified: trunk/testsuite/src/main/org/jboss/test/jmx/test/UndeployBrokenPackageUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/jmx/test/UndeployBrokenPackageUnitTestCase.java	2008-11-26 11:24:30 UTC (rev 81616)
+++ trunk/testsuite/src/main/org/jboss/test/jmx/test/UndeployBrokenPackageUnitTestCase.java	2008-11-26 11:52:58 UTC (rev 81617)
@@ -28,6 +28,7 @@
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.test.JBossTestCase;
 import org.jboss.util.file.Files;
+import org.jboss.util.platform.Java;
 
 /** Tests of reployment of bad deployment packages
  *
@@ -146,6 +147,15 @@
             log.info("caught exception as expected", e);
          }
 
+         // JBAS-5953, conditionally delay this test on Sun 1.6 JVM
+         // The deployed jar is still used by VFS that keeps files open for a while
+         // and overwriting the jar on this particular VM combination causes crashes
+         boolean sunVM = System.getProperty("java.vm.vendor").indexOf("Sun") > -1;
+         if (Java.isVersion(Java.VERSION_1_6) && sunVM)
+         {
+            // delay the file overwrite until the vfs reaper closes it
+            Thread.sleep(7000);
+         }
          //assertTrue(thejar.delete()); // TODO - this should work
          Files.copy(goodjar, thejar);
          getLog().info("Redeploying testPackage: " + testPackage);




More information about the jboss-cvs-commits mailing list