[jboss-svn-commits] JBL Code SVN: r30251 - in labs/jbosstm/trunk/qa: tests/src/org/jboss/jbossts/qa/CrashRecovery12Outcomes and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Nov 19 08:54:24 EST 2009


Author: jhalliday
Date: 2009-11-19 08:54:23 -0500 (Thu, 19 Nov 2009)
New Revision: 30251

Modified:
   labs/jbosstm/trunk/qa/TaskImpl.properties
   labs/jbosstm/trunk/qa/run-tests.xml
   labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/CrashRecovery12Outcomes/Outcome01.java
   labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/CrashRecoveryDelays.java
   labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/junit/testgroup/TestGroup_crashrecovery12.java
Log:
Tune crash rec test delays, update test timing info. JBTM-390


Modified: labs/jbosstm/trunk/qa/TaskImpl.properties
===================================================================
--- labs/jbosstm/trunk/qa/TaskImpl.properties	2009-11-19 13:35:45 UTC (rev 30250)
+++ labs/jbosstm/trunk/qa/TaskImpl.properties	2009-11-19 13:54:23 UTC (rev 30251)
@@ -64,15 +64,17 @@
 #
 COMMAND_LINE_10=-DCoordinatorEnvironmentBean.maintainHeuristics=NO
 # shorten recovery interval to speed crash rec tests
-COMMAND_LINE_11=-DRecoveryEnvironmentBean.periodicRecoveryPeriod=10
-COMMAND_LINE_12=-DRecoveryEnvironmentBean.recoveryBackoffPeriod=5
+# note all cr tests now use synchronous invoke of the reco mgr via CrashRecoveryDelays
+# so setting a short periodicRecoveryPeriod is no longer useful.
+#COMMAND_LINE_11=-DRecoveryEnvironmentBean.periodicRecoveryPeriod=10
+COMMAND_LINE_11=-DRecoveryEnvironmentBean.recoveryBackoffPeriod=5
 #
 # enable these to debug spawned processes. You may need to pause the test
 # framework in a debugger too, or it may spawn multiple procs on the same
 # debug port.
 #
-#COMMAND_LINE_14=-Xdebug
-#COMMAND_LINE_15=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006
+#COMMAND_LINE_12=-Xdebug
+#COMMAND_LINE_13=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006
 
 
 #

Modified: labs/jbosstm/trunk/qa/run-tests.xml
===================================================================
--- labs/jbosstm/trunk/qa/run-tests.xml	2009-11-19 13:35:45 UTC (rev 30250)
+++ labs/jbosstm/trunk/qa/run-tests.xml	2009-11-19 13:54:23 UTC (rev 30251)
@@ -84,7 +84,7 @@
     </target>
 
     <!-- General tests.
-        These tests should take a combined time of around 4 hrs or so.
+        These tests should take a combined time of around 2h20m or so.
     -->
     <target name="junit">
 
@@ -102,37 +102,37 @@
         <!-- txcore_utility : 40 tests, 1 minute -->
         <antcall target="junit-tests"><param name="tests" value="txcore_utility"/></antcall>
 
-        <!-- currenttests01 : 36 tests, 3 minutes -->
+        <!-- currenttests01 : 36 tests, 2 minutes -->
         <antcall target="junit-tests"><param name="tests" value="currenttests01"/></antcall>
         <!-- jtatests01 : 6 tests, 1 minute -->
         <antcall target="junit-tests"><param name="tests" value="jtatests01"/></antcall>
-        <!-- otsserver : 20 tests, 7 minutes -->
+        <!-- otsserver : 20 tests, 4 minutes -->
         <antcall target="junit-tests"><param name="tests" value="otsserver"/></antcall>
 
         <!-- rawresources01_1 : 6 tests, 1 minute -->
         <antcall target="junit-tests"><param name="tests" value="rawresources01_1"/></antcall>
-        <!-- rawresources01_2 : 294 tests, 30 minutes -->
+        <!-- rawresources01_2 : 294 tests, 15 minutes -->
         <antcall target="junit-tests"><param name="tests" value="rawresources01_2"/></antcall>
-        <!-- rawresources01_3 : 150 tests, 15 minutes -->
+        <!-- rawresources01_3 : 150 tests, 8 minutes -->
         <antcall target="junit-tests"><param name="tests" value="rawresources01_3"/></antcall>
         <!-- rawresources02_1 : 6 tests, 1 minute -->
         <antcall target="junit-tests"><param name="tests" value="rawresources02_1"/></antcall>
-        <!-- rawresources02_2 : 294 tests, 30 minutes -->
+        <!-- rawresources02_2 : 294 tests, 15 minutes -->
         <antcall target="junit-tests"><param name="tests" value="rawresources02_2"/></antcall>
-        <!-- rawresources02_3 : 150 tests, 15 minutes -->
+        <!-- rawresources02_3 : 150 tests, 8 minutes -->
         <antcall target="junit-tests"><param name="tests" value="rawresources02_3"/></antcall>
 
         <!-- rawsubtransactionawareresources01_1 : 6 tests, 1 minute -->
         <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources01_1"/></antcall>
         <!-- rawsubtransactionawareresources01_2 : 10 tests, 1 minute -->
         <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources01_2"/></antcall>
-        <!-- rawsubtransactionawareresources01_3 : 25 tests, 3 minutes -->
+        <!-- rawsubtransactionawareresources01_3 : 25 tests, 2 minutes -->
         <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources01_3"/></antcall>
         <!-- rawsubtransactionawareresources02_1 : 6 tests, 1 minute -->
         <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources02_1"/></antcall>
         <!-- rawsubtransactionawareresources02_2 : 10 tests, 1 minute -->
         <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources02_2"/></antcall>
-        <!-- rawsubtransactionawareresources02_3 : 25 tests, 3 minutes -->
+        <!-- rawsubtransactionawareresources02_3 : 25 tests, 2 minutes -->
         <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources02_3"/></antcall>
 
         <!-- crashrecovery01 : 24 tests, 3 minutes -->
@@ -153,13 +153,13 @@
         <antcall target="junit-tests"><param name="tests" value="crashrecovery06"/></antcall>
         <!-- crashrecovery07 : 16 tests, 4 minutes -->
         <antcall target="junit-tests"><param name="tests" value="crashrecovery07"/></antcall>
-        <!-- crashrecovery08 : 32 tests, 11 minutes -->
+        <!-- crashrecovery08 : 32 tests, 15 minutes -->
          <antcall target="junit-tests"><param name="tests" value="crashrecovery08"/></antcall>
         <!-- crashrecovery09 : 6 tests, 2 minutes -->
         <antcall target="junit-tests"><param name="tests" value="crashrecovery09"/></antcall>
         <!-- crashrecovery10 : 6 tests, 2 minutes -->
         <antcall target="junit-tests"><param name="tests" value="crashrecovery10"/></antcall>
-        <!-- crashrecovery12 : 7 tests, 5 minutes -->
+        <!-- crashrecovery12 : 7 tests, 2 minutes -->
         <antcall target="junit-tests"><param name="tests" value="crashrecovery12"/></antcall>
 
     </target>

Modified: labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/CrashRecovery12Outcomes/Outcome01.java
===================================================================
--- labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/CrashRecovery12Outcomes/Outcome01.java	2009-11-19 13:35:45 UTC (rev 30250)
+++ labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/CrashRecovery12Outcomes/Outcome01.java	2009-11-19 13:54:23 UTC (rev 30251)
@@ -32,6 +32,7 @@
 package org.jboss.jbossts.qa.CrashRecovery12Outcomes;
 
 import org.jboss.jbossts.qa.CrashRecovery12Clients.Client01;
+import org.jboss.jbossts.qa.Utils.CrashRecoveryDelays;
 
 import java.io.BufferedReader;
 import java.io.FileReader;
@@ -40,46 +41,18 @@
 {
 	public static void main(String[] args)
 	{
-		int waitTime = 0;
-		String resultsFile = Client01.resultsFile;
+		String resultsFile = args[0];
+        boolean recoveryPassedExpected = "yes".equalsIgnoreCase(args[1]);
+
 		boolean passed = false;
-		boolean recoveryPassedExpected = true;
+        boolean foundRecoveryPassed = false;
+        boolean foundPassed = false;
 
-		switch (args.length)
+		try
 		{
-			case 3:
-				recoveryPassedExpected = "yes".equalsIgnoreCase(args[2]);
-			case 2:
-				resultsFile = args[1];
-			case 1:
-				try
-				{
-					waitTime = Integer.parseInt(args[0]);
-				}
-				catch (final NumberFormatException nfe)
-				{
-					System.err.println("Failed to parse waitTime: " + args[0]);
-				}
-		}
+            CrashRecoveryDelays.awaitRecoveryCR12();
 
-		if (waitTime > 0)
-		{
-			System.err.println("Sleeping for " + waitTime + "ms");
-			try
-			{
-				Thread.sleep(waitTime);
-			}
-			catch (Exception ex)
-			{
-				System.err.println("Sleep interrupted");
-				ex.printStackTrace();
-			}
-		}
 
-		boolean foundRecoveryPassed = false;
-		boolean foundPassed = false;
-		try
-		{
 			FileReader fr = new FileReader(resultsFile);
 			BufferedReader br = new BufferedReader(fr);
 			String line;

Modified: labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/CrashRecoveryDelays.java
===================================================================
--- labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/CrashRecoveryDelays.java	2009-11-19 13:35:45 UTC (rev 30250)
+++ labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/CrashRecoveryDelays.java	2009-11-19 13:54:23 UTC (rev 30251)
@@ -56,6 +56,10 @@
         awaitRecovery(1, 1);
     }
 
+    public static void awaitRecoveryCR12() throws InterruptedException {
+        awaitRecovery(1, 1);
+    }
+
 /*
     // old, slow method - sleep long enough to ensure periodic cr will have occurred.
     private static void awaitRecovery(int num_cycles, int num_clients) throws InterruptedException
@@ -97,6 +101,7 @@
 
             // Output ping message
             out.println("SCAN");
+            out.flush();
 
             // Receive pong message
             String inMessage = in.readLine();
@@ -125,7 +130,7 @@
                 sckt.close();
             } catch(Exception e) {}
         }
-    }
+   }
 
     /////////////////
 

Modified: labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/junit/testgroup/TestGroup_crashrecovery12.java
===================================================================
--- labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/junit/testgroup/TestGroup_crashrecovery12.java	2009-11-19 13:35:45 UTC (rev 30250)
+++ labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/junit/testgroup/TestGroup_crashrecovery12.java	2009-11-19 13:54:23 UTC (rev 30251)
@@ -65,7 +65,7 @@
 		Task client0 = createTask("client0", org.jboss.jbossts.qa.CrashRecovery12Clients.Client01.class, Task.TaskType.EXPECT_PASS_FAIL, 240);
 		client0.start("prepare", "CR12_02.log");
 		Task outcome0 = createTask("outcome0", org.jboss.jbossts.qa.CrashRecovery12Outcomes.Outcome01.class, Task.TaskType.EXPECT_PASS_FAIL, 240);
-		outcome0.start("45000", "CR12_02.log", "no");
+		outcome0.start("CR12_02.log", "no");
 		outcome0.waitFor();
 		client0.waitFor();
 	}
@@ -76,7 +76,7 @@
 		Task client0 = createTask("client0", org.jboss.jbossts.qa.CrashRecovery12Clients.Client01.class, Task.TaskType.EXPECT_PASS_FAIL, 240);
 		client0.start("commit", "CR12_03.log");
 		Task outcome0 = createTask("outcome0", org.jboss.jbossts.qa.CrashRecovery12Outcomes.Outcome01.class, Task.TaskType.EXPECT_PASS_FAIL, 240);
-		outcome0.start("45000", "CR12_03.log", "yes");
+		outcome0.start("CR12_03.log", "yes");
 		outcome0.waitFor();
         client0.waitFor();
 	}
@@ -87,7 +87,7 @@
 		Task client0 = createTask("client0", org.jboss.jbossts.qa.CrashRecovery12Clients.Client01.class, Task.TaskType.EXPECT_PASS_FAIL, 240);
 		client0.start("rollback", "CR12_04.log");
 		Task outcome0 = createTask("outcome0", org.jboss.jbossts.qa.CrashRecovery12Outcomes.Outcome01.class, Task.TaskType.EXPECT_PASS_FAIL, 240);
-		outcome0.start("45000", "CR12_04.log", "no");
+		outcome0.start("CR12_04.log", "no");
 		outcome0.waitFor();
         client0.waitFor();
 	}
@@ -101,7 +101,7 @@
 		Task server1 = createTask("server1", com.arjuna.ats.arjuna.recovery.RecoveryManager.class, Task.TaskType.EXPECT_READY, 240);
 		server1.start("-test");
 		Task outcome0 = createTask("outcome0", org.jboss.jbossts.qa.CrashRecovery12Outcomes.Outcome01.class, Task.TaskType.EXPECT_PASS_FAIL, 240);
-		outcome0.start("45000", "CR12_05.log", "no");
+		outcome0.start("CR12_05.log", "no");
 		outcome0.waitFor();
 		server1.terminate();
 	}
@@ -115,7 +115,7 @@
 		Task server1 = createTask("server1", com.arjuna.ats.arjuna.recovery.RecoveryManager.class, Task.TaskType.EXPECT_READY, 240);
 		server1.start("-test");
 		Task outcome0 = createTask("outcome0", org.jboss.jbossts.qa.CrashRecovery12Outcomes.Outcome01.class, Task.TaskType.EXPECT_PASS_FAIL, 240);
-		outcome0.start("45000", "CR12_06.log", "yes");
+		outcome0.start("CR12_06.log", "yes");
 		outcome0.waitFor();
 		server1.terminate();
 	}
@@ -129,7 +129,7 @@
 		Task server1 = createTask("server1", com.arjuna.ats.arjuna.recovery.RecoveryManager.class, Task.TaskType.EXPECT_READY, 240);
 		server1.start("-test");
 		Task outcome0 = createTask("outcome0", org.jboss.jbossts.qa.CrashRecovery12Outcomes.Outcome01.class, Task.TaskType.EXPECT_PASS_FAIL, 240);
-		outcome0.start("45000", "CR12_07.log", "no");
+		outcome0.start("CR12_07.log", "no");
 		outcome0.waitFor();
 		server1.terminate();
 	}



More information about the jboss-svn-commits mailing list