[jboss-cvs] JBossAS SVN: r112351 - branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/deployment.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 14 12:14:39 EDT 2011


Author: klape
Date: 2011-10-14 12:14:39 -0400 (Fri, 14 Oct 2011)
New Revision: 112351

Modified:
   branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/deployment/JBPAPP6716UnitTestCase.java
Log:
[JBPAPP-7330] Fixing Windows build/test issues with MainDeployer tests

Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/deployment/JBPAPP6716UnitTestCase.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/deployment/JBPAPP6716UnitTestCase.java	2011-10-14 15:55:56 UTC (rev 112350)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/deployment/JBPAPP6716UnitTestCase.java	2011-10-14 16:14:39 UTC (rev 112351)
@@ -270,6 +270,16 @@
       }
       finally
       {
+         //Give time for the reaper to let go of the file lock
+         try
+         {
+            Thread.currentThread().sleep(15000);
+         }
+         catch (InterruptedException ie)
+         {
+            //Keep on moving
+         }
+
          // remove dummy.war from deploy directory
          if(dummyWarFile.delete() == false)
          {
@@ -491,7 +501,7 @@
 
       if (isWindows)
       {
-         command = JBOSS_HOME + "/bin/twiddle.bat " + args;
+         command = JBOSS_HOME + "\\bin\\twiddle.bat " + args;
       }
       else
       {
@@ -504,7 +514,15 @@
       boolean pass = true;
       try
       {
-         child = Runtime.getRuntime().exec(command, new String[]{"JBOSS_HOME="+JBOSS_HOME}, null);         
+         if (isWindows)
+         {
+            File userDir = new File(JBOSS_HOME + "\\bin");
+            child = Runtime.getRuntime().exec(command, null, userDir);
+         }
+         else
+         {
+            child = Runtime.getRuntime().exec(command, new String[]{"JBOSS_HOME="+JBOSS_HOME}, null);
+         }
 
          String st;
          // get input stream from process
@@ -634,4 +652,4 @@
          }            
       }
    }
-}
\ No newline at end of file
+}



More information about the jboss-cvs-commits mailing list