You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2012/10/06 07:07:50 UTC

svn commit: r1394925 - /incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java

Author: aharui
Date: Sat Oct  6 05:07:49 2012
New Revision: 1394925

URL: http://svn.apache.org/viewvc?rev=1394925&view=rev
Log:
Put in a wait to see if player will exit on its own.  Might slow down runs by delaying launch of next swf, but will hopefully help to prevent lost tests from SWFs not launching.

Modified:
    incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java

Modified: incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java?rev=1394925&r1=1394924&r2=1394925&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java (original)
+++ incubator/flex/sdk/branches/develop/mustella/java/src/mustella/Runner.java Sat Oct  6 05:07:49 2012
@@ -1589,7 +1589,18 @@ public class Runner {
 
 		public void clobberProcess (boolean timedOut) {
 
-			System.out.println ("clobberProcess");
+			System.out.println ("clobberProcess " + timedOut);
+			if (!timedOut)
+			{
+				int wait = 0;
+				while (wait < 5000 && p != null)
+				{
+					try { Thread.sleep (100);
+					}catch (Exception e)  {}
+					wait += 100;
+				}
+				System.out.println ("waited " + wait);
+			}
 			if (p != null) {
 
 				if (coverage_timeout > 0) {
@@ -1600,6 +1611,7 @@ public class Runner {
 				}
 
 				try {
+					System.out.println ("ClobberProcess, destroying process");
 					p.destroy();
 				} catch (Exception e)
 					{ System.out.println("attempt to destroy process failed, but could be natural ending"); e.printStackTrace();
@@ -1684,6 +1696,8 @@ public class Runner {
 				e.printStackTrace();
 			}
 
+			p = null;
+			
 			/// if we got here, it's done
 			running = false;
 			System.out.println ("Total Results so far: " + localResultStore.size());