Bug 499784 - A lot of timeouts in dsf-gdb tests are too optimistic

The bug mentioned above mentions a couple of problems,
1) The use of TestsPlugin.massageTimeout() is not used consistently in
tests.dsf.gdb
2) The timout values are too optimistic

This first change addresses item 1.

Change-Id: I99162bbfaa099bbc4123594fbda51f8e11be9d10
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java
index aabb0d9..2b61648 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/SyncUtil.java
@@ -54,8 +54,8 @@
 import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
 import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
 import org.eclipse.cdt.dsf.debug.service.IRunControl.StepType;
-import org.eclipse.cdt.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
 import org.eclipse.cdt.dsf.debug.service.ISourceLookup;
+import org.eclipse.cdt.dsf.debug.service.ISourceLookup.ISourceLookupDMContext;
 import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMContext;
 import org.eclipse.cdt.dsf.debug.service.IStack.IFrameDMData;
 import org.eclipse.cdt.dsf.debug.service.IStack.IVariableDMContext;
@@ -74,7 +74,6 @@
 import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo;
 import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakListInfo;
 import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakpoint;
-import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo;
 import org.eclipse.cdt.dsf.service.DsfServicesTracker;
 import org.eclipse.cdt.dsf.service.DsfSession;
 import org.eclipse.cdt.tests.dsf.gdb.framework.SyncUtil.DefaultTimeouts.ETimeout;
@@ -134,28 +133,20 @@
 		return retVal;
 	}
 
-	public static MIStoppedEvent step(final StepType stepType, int numSteps, int timeout) throws Throwable {
-	    MIStoppedEvent retVal = null;
-		for (int i=0; i<numSteps; i++) {
-		    retVal = step(stepType, timeout);
-		}
-		return retVal;
-	}
-
 	public static MIStoppedEvent step(StepType stepType) throws Throwable {
 		return step(stepType, DefaultTimeouts.get(ETimeout.step));
 	}
 
-	public static MIStoppedEvent step(StepType stepType, int timeout) throws Throwable {
+	public static MIStoppedEvent step(StepType stepType, int massagedTimeout) throws Throwable {
         IContainerDMContext containerDmc = SyncUtil.getContainerContext();
-		return step(containerDmc, stepType, timeout);
+		return step(containerDmc, stepType, massagedTimeout);
 	}
 	
 	public static MIStoppedEvent step(IExecutionDMContext dmc, StepType stepType) throws Throwable {
 		return step(dmc, stepType, DefaultTimeouts.get(ETimeout.step));		
 	}
 	
-	public static MIStoppedEvent step(final IExecutionDMContext dmc, final StepType stepType, int timeout) throws Throwable {
+	public static MIStoppedEvent step(final IExecutionDMContext dmc, final StepType stepType, int massagedTimeout) throws Throwable {
 		
 		final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
 			new ServiceEventWaitor<MIStoppedEvent>(
@@ -184,22 +175,22 @@
 		});
 
 		// Wait for the execution to suspend after the step
-		return eventWaitor.waitForEvent(timeout);
+		return eventWaitor.waitForEvent(massagedTimeout);
 	}
 
 	public static String addBreakpoint(String location) throws Throwable {
 		return addBreakpoint(location, DefaultTimeouts.get(ETimeout.addBreakpoint));
 	}
 
-	public static String addBreakpoint(String location, int timeout) throws Throwable {
-		return addBreakpoint(location, true, timeout);
+	public static String addBreakpoint(String location, int massagedTimeout) throws Throwable {
+		return addBreakpoint(location, true, massagedTimeout);
 	}
 
 	public static String addBreakpoint(String location, boolean temporary) throws Throwable {
 		return addBreakpoint(location, temporary, DefaultTimeouts.get(ETimeout.addBreakpoint));
 	}
 	
-	public static String addBreakpoint(final String location, final boolean temporary, int timeout)
+	private static String addBreakpoint(final String location, final boolean temporary, int massagedTimeout)
 							throws Throwable {
 
         IContainerDMContext containerDmc = SyncUtil.getContainerContext();
@@ -215,7 +206,7 @@
 		};
 		
 		fGdbControl.getExecutor().execute(query);
-		MIBreakInsertInfo info = query.get(timeout, TimeUnit.MILLISECONDS);
+		MIBreakInsertInfo info = query.get(massagedTimeout, TimeUnit.MILLISECONDS);
         return info.getMIBreakpoints()[0].getNumber();
 	}
 
@@ -232,7 +223,7 @@
 		};
 		
 		fGdbControl.getExecutor().execute(query);
-		MIBreakListInfo info = query.get(timeout, TimeUnit.MILLISECONDS);
+		MIBreakListInfo info = query.get(TestsPlugin.massageTimeout(timeout), TimeUnit.MILLISECONDS);
 		MIBreakpoint[] breakpoints = info.getMIBreakpoints();
 		
 		String[] result = new String[breakpoints.length];
@@ -241,30 +232,8 @@
 		}
 		return result;
 	}
-	
-	public static void deleteBreakpoint(String breakpointIndex, int timeout) throws Throwable {
-		deleteBreakpoint(new String[] {breakpointIndex}, timeout);
-	}
-	
-	public static void deleteBreakpoint(final String[] breakpointIndices, int timeout) throws Throwable {
-        IContainerDMContext containerDmc = SyncUtil.getContainerContext();
-        final IBreakpointsTargetDMContext bpTargetDmc = DMContexts.getAncestorOfType(containerDmc, IBreakpointsTargetDMContext.class);
 
-        Query<MIInfo> query = new Query<MIInfo>() {
-			@Override
-			protected void execute(DataRequestMonitor<MIInfo> rm) {
-				fGdbControl.queueCommand(
-						fCommandFactory.createMIBreakDelete(bpTargetDmc, breakpointIndices),
-						rm);
-			}
-		};
-		
-		fGdbControl.getExecutor().execute(query);
-		query.get(timeout, TimeUnit.MILLISECONDS);
-	}
-
-	
-	public static MIStoppedEvent resumeUntilStopped(final IExecutionDMContext dmc, int timeout) throws Throwable {
+	private static MIStoppedEvent resumeUntilStopped(final IExecutionDMContext dmc, int massagedTimeout) throws Throwable {
         final ServiceEventWaitor<MIStoppedEvent> eventWaitor =
             new ServiceEventWaitor<MIStoppedEvent>(
                     fSession,
@@ -282,19 +251,21 @@
 		});
 
 		// Wait for the execution to suspend after the step
-		return eventWaitor.waitForEvent(TestsPlugin.massageTimeout(timeout));
+		return eventWaitor.waitForEvent(massagedTimeout);
 	}
 
 	public static MIStoppedEvent resumeUntilStopped() throws Throwable {
-		return resumeUntilStopped(DefaultTimeouts.get(ETimeout.resumeUntilStopped));
+        IContainerDMContext containerDmc = SyncUtil.getContainerContext();
+        // Don't call resumeUtilStopped(int timeout) as this will duplicate the timeout massage 
+		return resumeUntilStopped(containerDmc, DefaultTimeouts.get(ETimeout.resumeUntilStopped));
 	}
 
 	public static MIStoppedEvent resumeUntilStopped(int timeout) throws Throwable {
         IContainerDMContext containerDmc = SyncUtil.getContainerContext();
-		return resumeUntilStopped(containerDmc, timeout);
+		return resumeUntilStopped(containerDmc, TestsPlugin.massageTimeout(timeout));
 	}
 
-	public static MIRunningEvent resume(final IExecutionDMContext dmc, int timeout) throws Throwable {
+	public static MIRunningEvent resume(final IExecutionDMContext dmc, int massagedTimeout) throws Throwable {
         final ServiceEventWaitor<MIRunningEvent> eventWaitor =
             new ServiceEventWaitor<MIRunningEvent>(
                     fSession,
@@ -312,7 +283,7 @@
 		});
 
 		// Wait for the execution to start after the step
-    	return eventWaitor.waitForEvent(timeout);			
+    	return eventWaitor.waitForEvent(massagedTimeout);
 	}
 
 	public static boolean canResume(final IExecutionDMContext execDmc) throws Throwable {	
@@ -330,7 +301,7 @@
         };
 
         fRunControl.getExecutor().execute(query);
-        boolean canResume = query.get(500, TimeUnit.MILLISECONDS);
+        boolean canResume = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
         return canResume;
 	}
 
@@ -338,32 +309,33 @@
 		return resume(DefaultTimeouts.get(ETimeout.resume));
 	}
 
-	public static MIRunningEvent resume(int timeout) throws Throwable {
+	public static MIRunningEvent resume(int massagedTimeout) throws Throwable {
         IContainerDMContext containerDmc = SyncUtil.getContainerContext();
-		return resume(containerDmc, timeout);
+		return resume(containerDmc, massagedTimeout);
 	}
 
 	public static void resumeAll() throws Throwable {
 		resumeAll(DefaultTimeouts.get(ETimeout.resume));
 	}
 
-	public static void resumeAll(int timeout) throws Throwable {
+	public static void resumeAll(int massagedTimeout) throws Throwable {
         IMIExecutionDMContext[] threadDmcs = SyncUtil.getExecutionContexts();
         for (IMIExecutionDMContext thread : threadDmcs) {
         	if (canResume(thread)) {
-        		resume(thread, timeout);
+        		resume(thread, massagedTimeout);
         	}
         }
 	}
 
 	public static MIStoppedEvent waitForStop() throws Throwable {
-		return waitForStop(DefaultTimeouts.get(ETimeout.waitForStop));
+		// Use a direct value to avoid double call to TestsPlugin.massageTimeout
+		return waitForStop(10000);
 	}
 	
 	// This method is risky.  If the command to resume/step execution
 	// is sent and the stopped event is received before we call this method
 	// here, then we will miss the stopped event.
-	// Normally, one shoudl initialize the ServiveEventWaitor before
+	// Normally, one should initialize the ServiveEventWaitor before
 	// triggering the resume to make sure not to miss the stopped event.
 	// However, in some case this method will still work, for instance
 	// if there is a sleep in the code between the resume and the time
@@ -387,7 +359,9 @@
 		// Note that if there were other breakpoints set ahead of this one,
 		// they will stop execution earlier than planned
 		addBreakpoint(location, true, timeout);
-		return resumeUntilStopped(timeout);
+		// Don't provide a timeout so we use the resume default timeout for this step 
+		// if a timeout value is provided via DefaultTimeouts the value will be massaged twice
+		return resumeUntilStopped();
 	}
 	
     public static IFrameDMContext getStackFrame(final IExecutionDMContext execCtx, final int level) throws Exception {
@@ -408,7 +382,7 @@
 		};
 
 		fSession.getExecutor().execute(query);
-		return query.get(500, TimeUnit.MILLISECONDS);
+		return query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     }
 	
     /**
@@ -432,7 +406,7 @@
         };
 
         fSession.getExecutor().execute(query);
-        return query.get(500, TimeUnit.MILLISECONDS);
+        return query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     }
 
     public static IFrameDMData getFrameData(final IExecutionDMContext execCtx, final int level) throws Throwable {
@@ -452,7 +426,7 @@
     	};
 
     	fSession.getExecutor().execute(query);
-    	return query.get(500, TimeUnit.MILLISECONDS);
+    	return query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     }
     
     public static IFrameDMData getFrameData(final int threadId, final int level) throws Throwable {
@@ -476,7 +450,7 @@
 		};
 
 		fSession.getExecutor().execute(query);
-		return query.get(500, TimeUnit.MILLISECONDS);
+		return query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 
     public static IExpressionDMContext createExpression(final IDMContext parentCtx, final String expression)
@@ -740,7 +714,7 @@
         };
 
         fGdbControl.getExecutor().execute(query);
-        boolean canRestart = query.get(500, TimeUnit.MILLISECONDS);
+        boolean canRestart = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
         return canRestart;
 	}
 
@@ -775,7 +749,7 @@
         };
 
         fGdbControl.getExecutor().execute(query2);
-        query2.get(500, TimeUnit.MILLISECONDS);
+        query2.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
         
         
  		MIStoppedEvent event = eventWaitor.waitForEvent(DefaultTimeouts.get(ETimeout.waitForStop));
@@ -823,7 +797,7 @@
     	};
 
     	fSession.getExecutor().execute(query);
-    	IVariableDMData[] result = query.get(500, TimeUnit.MILLISECONDS);
+    	IVariableDMData[] result = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	return result;
     }
 
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBConsoleSynchronizingTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBConsoleSynchronizingTest.java
index 306f31ec..79b81b6 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBConsoleSynchronizingTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/GDBConsoleSynchronizingTest.java
@@ -59,7 +59,7 @@
 public class GDBConsoleSynchronizingTest extends BaseParametrizedTestCase {
 	final static private String EXEC_NAME = "ConsoleSyncTestApp.exe";
 
-	final static private int DEFAULT_TIMEOUT = 1000;
+	final static private int DEFAULT_TIMEOUT = TestsPlugin.massageTimeout(1000);
 	final static private TimeUnit DEFAULT_TIME_UNIT = TimeUnit.MILLISECONDS;
 	final static private String NEW_VAR_VALUE = "0x12345678";
 	final static private int NEW_VAR_SIZE = 4; // The number of bytes of NEW_VAR_VALUE
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java
index d890f34..0efd6a5 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/LaunchConfigurationAndRestartTest.java
@@ -170,7 +170,7 @@
     	};
     	try {
     		fExpService.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -248,7 +248,7 @@
     	};
     	try {
     		fExpService.getExecutor().execute(query);
-    		FormattedValueDMData value = query.get(500, TimeUnit.MILLISECONDS);
+    		FormattedValueDMData value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     		
     		// Argc should be 7: the program name and the six arguments
     		assertTrue("Expected 7 but got " + value.getFormattedValue(),
@@ -272,7 +272,7 @@
     	};
     	try {
     		fExpService.getExecutor().execute(query2);
-    		FormattedValueDMData value = query2.get(500, TimeUnit.MILLISECONDS);
+    		FormattedValueDMData value = query2.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     		assertTrue("Expected \"6\" but got " + value.getFormattedValue(),
     				value.getFormattedValue().trim().endsWith("\"6\""));
     	} catch (InterruptedException e) {
@@ -318,7 +318,7 @@
         };
         try {
         	fExpService.getExecutor().execute(query);
-        	FormattedValueDMData value = query.get(500, TimeUnit.MILLISECONDS);
+        	FormattedValueDMData value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
         	assertTrue("Expected 0x0 but got " + value.getFormattedValue(),
         			   value.getFormattedValue().equals("0x0"));
         } catch (InterruptedException e) {
@@ -367,7 +367,7 @@
     	};
     	try {
     		fExpService.getExecutor().execute(query);
-    		FormattedValueDMData value = query.get(500, TimeUnit.MILLISECONDS);
+    		FormattedValueDMData value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     		assertTrue("Expected a string ending with \"IS SET\" but got " + value.getFormattedValue(),
     				value.getFormattedValue().trim().endsWith("\"IS SET\""));
     	} catch (InterruptedException e) {
@@ -389,7 +389,7 @@
         };
         try {
         	fExpService.getExecutor().execute(query2);
-        	FormattedValueDMData value = query2.get(500, TimeUnit.MILLISECONDS);
+        	FormattedValueDMData value = query2.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
         	assertFalse("Expected something else than 0x0",
         			   value.getFormattedValue().equals("0x0"));
         } catch (InterruptedException e) {
@@ -441,7 +441,7 @@
     	};
     	try {
     		fExpService.getExecutor().execute(query);
-    		FormattedValueDMData value = query.get(500, TimeUnit.MILLISECONDS);
+    		FormattedValueDMData value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     		assertTrue("Expected a string ending with \"IS SET\" but got " + value.getFormattedValue(),
     				value.getFormattedValue().trim().endsWith("\"IS SET\""));
     	} catch (InterruptedException e) {
@@ -464,7 +464,7 @@
         };
         try {
         	fExpService.getExecutor().execute(query2);
-        	FormattedValueDMData value = query2.get(500, TimeUnit.MILLISECONDS);
+        	FormattedValueDMData value = query2.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
         	assertTrue("Expected 0x0 but got " + value.getFormattedValue(),
         			   value.getFormattedValue().equals("0x0"));
         } catch (InterruptedException e) {
@@ -507,7 +507,7 @@
     	};
     	try {
     		fExpService.getExecutor().execute(query);
-    		FormattedValueDMData value = query.get(500, TimeUnit.MILLISECONDS);
+    		FormattedValueDMData value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     		
     		// Argc should be 7: the program name and the six arguments
     		assertTrue("Expected 7 but got " + value.getFormattedValue(),
@@ -531,7 +531,7 @@
     	};
     	try {
     		fExpService.getExecutor().execute(query2);
-    		FormattedValueDMData value = query2.get(500, TimeUnit.MILLISECONDS);
+    		FormattedValueDMData value = query2.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     		assertTrue("Expected \"6\" but got " + value.getFormattedValue(),
     				value.getFormattedValue().trim().endsWith("\"6\""));
     	} catch (InterruptedException e) {
@@ -578,7 +578,7 @@
     		}
     	};
    		fExpService.getExecutor().execute(query);
-   		FormattedValueDMData value = query.get(500, TimeUnit.MILLISECONDS);
+   		FormattedValueDMData value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     		
    		// Argc should be 2: the program name and the one arguments
    		assertTrue("Expected 2 but got " + value.getFormattedValue(),
@@ -594,7 +594,7 @@
     		}
     	};
     	fExpService.getExecutor().execute(query2);
-    	value = query2.get(500, TimeUnit.MILLISECONDS);
+    	value = query2.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
    		assertTrue("Expected \"" + argumentUsedByGDB + "\" but got " + value.getFormattedValue(),
    				value.getFormattedValue().trim().endsWith(argumentUsedByGDB));
     }
@@ -632,7 +632,7 @@
     		}
     	};
     	fExpService.getExecutor().execute(query);
-    	FormattedValueDMData value = query.get(500, TimeUnit.MILLISECONDS);
+    	FormattedValueDMData value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     		
     	// Argc should be 2: the program name and the four arguments.
     	assertTrue("Expected 2 but got " + value.getFormattedValue(),
@@ -648,7 +648,7 @@
     		}
     	};
     	fExpService.getExecutor().execute(query2);
-    	value = query2.get(500, TimeUnit.MILLISECONDS);
+    	value = query2.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
    		assertTrue("Expected \"" + argumentUsedByGDB + "\" but got " + value.getFormattedValue(),
    				value.getFormattedValue().endsWith(argumentUsedByGDB));
     }
@@ -839,7 +839,7 @@
     	};
     	try {
     		fExpService.getExecutor().execute(query);
-    		MIBreakListInfo value = query.get(500, TimeUnit.MILLISECONDS);
+    		MIBreakListInfo value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     		MIBreakpoint[] bps = value.getMIBreakpoints();
     		assertTrue("Expected 1 breakpoint but got " + bps.length,
     				   bps.length == 1);
@@ -907,7 +907,7 @@
     	};
     	try {
     		fGdbControl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -916,7 +916,7 @@
     		fail(e.getMessage());
     	}
     	
-    	stoppedEvent = eventWaitor.waitForEvent(1000);
+    	stoppedEvent = eventWaitor.waitForEvent(TestsPlugin.massageTimeout(1000));
     	
     	assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN+NUM_STEPS-REVERSE_NUM_STEPS) + " but got " +
   			   stoppedEvent.getFrame().getFunction() + ":" +
@@ -983,7 +983,7 @@
     	};
     	try {
     		fGdbControl.getExecutor().execute(query2);
-    		query2.get(500, TimeUnit.MILLISECONDS);
+    		query2.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -992,7 +992,7 @@
     		fail(e.getMessage());
     	}
     	
-    	stoppedEvent = eventWaitor.waitForEvent(1000);
+    	stoppedEvent = eventWaitor.waitForEvent(TestsPlugin.massageTimeout(1000));
     	
     	assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN) + " but got " +
   			   stoppedEvent.getFrame().getFunction() + ":" +
@@ -1066,7 +1066,7 @@
     	};
     	try {
     		fGdbControl.getExecutor().execute(query2);
-    		query2.get(500, TimeUnit.MILLISECONDS);
+    		query2.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -1075,7 +1075,7 @@
     		fail(e.getMessage());
     	}
     	
-    	stoppedEvent = eventWaitor.waitForEvent(1000);
+    	stoppedEvent = eventWaitor.waitForEvent(TestsPlugin.massageTimeout(1000));
     	
     	assertTrue("Expected to stop at main:" + (FIRST_LINE_IN_MAIN) + " but got " +
   			   stoppedEvent.getFrame().getFunction() + ":" +
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java
index d9eb458..9396182 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java
@@ -2525,7 +2525,7 @@
 			}
 		};
 		fSession.getExecutor().execute(query);
-		query.get(20000, TimeUnit.MILLISECONDS);
+		query.get(TestsPlugin.massageTimeout(20000), TimeUnit.MILLISECONDS);
 	}
 
 	private void deleteAllPlatformBreakpoints() throws Exception {
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java
index be2273f..de9d816 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIExpressionsTest.java
@@ -534,7 +534,7 @@
 		fExpService.getExecutor().submit(writeQuery);
 		writeQuery.get();
 
-		IExpressionChangedDMEvent event = eventWaitor.waitForEvent(1000);
+		IExpressionChangedDMEvent event = eventWaitor.waitForEvent(TestsPlugin.massageTimeout(1000));
 		assertThat(event.getDMContext(), is(exprDmc));
 
 		// Read the new value in decimal and check that it is what we expected
@@ -3539,7 +3539,7 @@
     	};
     	
         fSession.getExecutor().execute(query);
-        String value = query.get(500, TimeUnit.MILLISECONDS);
+        String value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertEquals("65", value);
 	    
 		final IExpressionDMContext[] castChildren = getChildren(castExprDmc, new String[] {"*((char*)(int_ptr))"});
@@ -3557,7 +3557,7 @@
 			}
     	};        
     	fSession.getExecutor().execute(query);
-        value = query.get(500, TimeUnit.MILLISECONDS);
+        value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertEquals("65 'A'", value);
 		
 		// Now check that the casted type still remembers what its original type is
@@ -3606,7 +3606,7 @@
 	    	};
 
 	    	fSession.getExecutor().execute(query);
-	    	String value = query.get(500, TimeUnit.MILLISECONDS);
+	    	String value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	    	assertEquals(expectedValues[i], value);
 	    }
 	    
@@ -3664,7 +3664,7 @@
 	    	};
 
 	    	fSession.getExecutor().execute(query);
-	    	String value = query.get(500, TimeUnit.MILLISECONDS);
+	    	String value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	    	assertEquals(expectedValues[i], value);
 	    }
 	    
@@ -3722,7 +3722,7 @@
 	    	};
 
 	    	fSession.getExecutor().execute(query);
-	    	String value = query.get(500, TimeUnit.MILLISECONDS);
+	    	String value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	    	assertEquals(expectedValues[i-4], value);
 	    }
 	    
@@ -3787,7 +3787,7 @@
 	    	};
 
 	    	fSession.getExecutor().execute(query);
-	    	String value = query.get(500, TimeUnit.MILLISECONDS);
+	    	String value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	    	assertEquals(expectedValues[i], value);
 	    }	    
 		
@@ -3858,7 +3858,7 @@
 	    	};
 
 	    	fSession.getExecutor().execute(query);
-	    	String value = query.get(500, TimeUnit.MILLISECONDS);
+	    	String value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	    	assertEquals(expectedValues[i], value);
 	    }	    
 		
@@ -3927,7 +3927,7 @@
 	    	};
 
 	    	fSession.getExecutor().execute(query);
-	    	String value = query.get(500, TimeUnit.MILLISECONDS);
+	    	String value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	    	assertEquals(expectedValues[i], value);
 	    }	    
 		
@@ -3969,7 +3969,7 @@
 			}
 		};
 		fSession.getExecutor().execute(query);
-		IExpressionDMData data = query.get(500, TimeUnit.MILLISECONDS);
+		IExpressionDMData data = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertEquals("testSimpleReturn() returned", data.getName());
 
 		// Now check the actual value using the expression service
@@ -4019,7 +4019,7 @@
 			}
 		};
 		fSession.getExecutor().execute(query);
-		IExpressionDMData data = query.get(500, TimeUnit.MILLISECONDS);
+		IExpressionDMData data = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertEquals("testComplexReturn() returned", data.getName());
 
 		// Now check the content of the complex return expression
@@ -4088,7 +4088,7 @@
     	};
     	
         fSession.getExecutor().execute(query);
-        String value = query.get(500, TimeUnit.MILLISECONDS);
+        String value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertEquals("8", value);
 
     	// Now fetch the child through its parent
@@ -4135,7 +4135,7 @@
     	};
     	
         fSession.getExecutor().execute(query);
-        value = query.get(500, TimeUnit.MILLISECONDS);
+        value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertEquals("8", value);
     }
 
@@ -4199,7 +4199,7 @@
     	};
     	
         fSession.getExecutor().execute(query);
-        String value = query.get(500, TimeUnit.MILLISECONDS);
+        String value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertEquals("8", value);
 
     	// Now access the child directly
@@ -4219,7 +4219,7 @@
     	};
     	
         fSession.getExecutor().execute(query);
-        value = query.get(500, TimeUnit.MILLISECONDS);
+        value = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertEquals("8", value);
     }
 
@@ -4257,7 +4257,7 @@
     	};
     	
         fSession.getExecutor().execute(query);
-        String type = query.get(500, TimeUnit.MILLISECONDS);
+        String type = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertEquals(expectedType, type);
 		return type;
     }
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java
index 98c32b3..79eaf96 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java
@@ -212,7 +212,7 @@
 
 		fSession.getExecutor().execute(queryRegisters);
 
-		IRegisterDMContext[] regContexts = queryRegisters.get(500, TimeUnit.MILLISECONDS);
+		IRegisterDMContext[] regContexts = queryRegisters.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 
 		assertEquals("Wrong number of registers", get_X86_REGS().size(), regContexts.length);
 
@@ -232,7 +232,7 @@
 		};
 
 		fRegService.getExecutor().submit(queryRegistersDmc);           
-        IRegisterDMContext[] regContexts = queryRegistersDmc.get(500, TimeUnit.MILLISECONDS);
+        IRegisterDMContext[] regContexts = queryRegistersDmc.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 
         return(regContexts);
     }
@@ -329,7 +329,7 @@
 
 		fRegService.getExecutor().submit(queryFormattedData);
 
-		FormattedValueDMData data = queryFormattedData.get(500, TimeUnit.MILLISECONDS);
+		FormattedValueDMData data = queryFormattedData.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		return data.getFormattedValue();
 	}
 
@@ -430,7 +430,7 @@
 		};
 
 		fRegService.getExecutor().submit(queryAction);
-		queryAction.get(500, TimeUnit.MILLISECONDS);
+		queryAction.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 	
 	/**
@@ -938,7 +938,7 @@
 
 		fRegService.getExecutor().execute(queryGroupsCtx);
 
-		IRegisterGroupDMContext[] regGroupsDMCs = queryGroupsCtx.get(500, TimeUnit.MILLISECONDS);
+		IRegisterGroupDMContext[] regGroupsDMCs = queryGroupsCtx.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 
 		return (regGroupsDMCs);
 	}
@@ -967,7 +967,7 @@
 		};
 
 		fRegService.getExecutor().submit(queryAction);
-		return queryAction.get(500, TimeUnit.MILLISECONDS);
+		return queryAction.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 
 	private boolean canEditRegisterGroup(final IRegisterGroupDMContext context) throws Throwable {
@@ -979,7 +979,7 @@
 		};
 
 		fRegService.getExecutor().submit(queryAction);
-		return queryAction.get(500, TimeUnit.MILLISECONDS);
+		return queryAction.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 
 	private boolean canRemoveRegisterGroups(final IRegisterGroupDMContext[] groupsContext) throws Throwable {
@@ -991,7 +991,7 @@
 		};
 
 		fRegService.getExecutor().submit(queryAction);
-		return queryAction.get(500, TimeUnit.MILLISECONDS);
+		return queryAction.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 	
 	private void addGroup(final String groupName, final IRegisterDMContext[] regIndexes) throws Throwable {
@@ -1010,7 +1010,7 @@
 		};
 
 		fRegService.getExecutor().submit(queryAction);
-		queryAction.get(500, TimeUnit.MILLISECONDS);
+		queryAction.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 
 	private void editGroup(final IRegisterGroupDMContext group, final String newGroupName, final IRegisterDMContext[] regIndexes) throws Throwable {
@@ -1023,7 +1023,7 @@
 		};
 
 		fRegService.getExecutor().submit(queryAction);
-		queryAction.get(500, TimeUnit.MILLISECONDS);
+		queryAction.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 
 	private void removeGroups(final IRegisterGroupDMContext[] groups) throws Throwable {
@@ -1036,7 +1036,7 @@
 		};
 
 		fRegService.getExecutor().submit(queryAction);
-		queryAction.get(500, TimeUnit.MILLISECONDS);
+		queryAction.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 
 	private boolean canRestoreDefaultGroups() throws Throwable {
@@ -1053,7 +1053,7 @@
 		fRegService.getExecutor().submit(queryCanRestore);
 
 		//Validate, we can always restore to defaults
-		return queryCanRestore.get(500, TimeUnit.MILLISECONDS);
+		return queryCanRestore.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 	
 	private void restoreDefaultGroups() throws Throwable {
@@ -1069,7 +1069,7 @@
 
 		fRegService.getExecutor().submit(queryRestore);
 
-		queryRestore.get(500, TimeUnit.MILLISECONDS);
+		queryRestore.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 
 	private void resetRegService() throws Throwable {
@@ -1086,7 +1086,7 @@
 
 		regManager.getExecutor().submit(queryReset);
 
-		queryReset.get(500, TimeUnit.MILLISECONDS);
+		queryReset.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 
 	private void saveRegGroups() throws Throwable {
@@ -1104,7 +1104,7 @@
 
 		regManager.getExecutor().submit(querySave);
 
-		querySave.get(500, TimeUnit.MILLISECONDS);
+		querySave.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 	}
 
 	private IRegisterDMData getRegisterData(final IRegisterDMContext registerDmc) throws Throwable {
@@ -1116,7 +1116,7 @@
 		};
 
 		fRegService.getExecutor().submit(registerDataQ);
-		IRegisterDMData registerData = registerDataQ.get(500, TimeUnit.MILLISECONDS);
+		IRegisterDMData registerData = registerDataQ.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertNotNull(registerData);
 
 		return registerData;
@@ -1132,7 +1132,7 @@
 		};
 
 		fRegService.getExecutor().submit(registerValueQ);
-		FormattedValueDMData registerValue = registerValueQ.get(500, TimeUnit.MILLISECONDS);
+		FormattedValueDMData registerValue = registerValueQ.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertNotNull(registerValue);
 
 		return registerValue;
@@ -1147,7 +1147,7 @@
 		};
 
 		fRegService.getExecutor().submit(groupDataQ);
-		IRegisterGroupDMData groupData = groupDataQ.get(500, TimeUnit.MILLISECONDS);
+		IRegisterGroupDMData groupData = groupDataQ.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertNotNull(groupData);
 
 		return groupData;
@@ -1162,7 +1162,7 @@
 		};
 
 		fRegService.getExecutor().submit(groupDataQ);
-		IRegisterGroupDMData[] groupsData = groupDataQ.get(500, TimeUnit.MILLISECONDS);
+		IRegisterGroupDMData[] groupsData = groupDataQ.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
 		assertNotNull(groupsData);
 
 		return groupsData;
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTargetAvailableTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTargetAvailableTest.java
index 05dc4cd..31bd912 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTargetAvailableTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTargetAvailableTest.java
@@ -129,7 +129,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -184,7 +184,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -246,7 +246,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -317,7 +317,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -383,7 +383,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -462,7 +462,7 @@
         boolean caughtError = false;
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -526,7 +526,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -601,7 +601,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -670,7 +670,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -744,7 +744,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -811,7 +811,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -883,7 +883,7 @@
         };
     	try {
     		fRunCtrl.getExecutor().execute(query);
-    		query.get(500, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java
index a0cd0f4..ea62747 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/OperationsWhileTargetIsRunningTest.java
@@ -243,7 +243,7 @@
     	};
     	try {
     		fProcesses.getExecutor().execute(query);
-    		query.get(1000, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(1000), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -331,7 +331,7 @@
     	};
     	try {
     		fProcesses.getExecutor().execute(query);
-    		query.get(1000, TimeUnit.MILLISECONDS);
+    		query.get(TestsPlugin.massageTimeout(1000), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/nonstop/GDBMultiNonStopRunControlTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/nonstop/GDBMultiNonStopRunControlTest.java
index ce21cbb..95500f4 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/nonstop/GDBMultiNonStopRunControlTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/nonstop/GDBMultiNonStopRunControlTest.java
@@ -125,7 +125,7 @@
     	V result = null;
     	try {
     		fMultiRun.getExecutor().execute(query);
-    		result = query.get(500, TimeUnit.MILLISECONDS);
+    		result = query.get(TestsPlugin.massageTimeout(500), TimeUnit.MILLISECONDS);
     	} catch (InterruptedException e) {
     		fail(e.getMessage());
     	} catch (ExecutionException e) {
@@ -343,8 +343,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected two threads but got " + threads.length, threads.length == 2);
@@ -443,12 +443,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected two threads but got " + threads.length, threads.length == 2);
@@ -547,12 +547,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -661,7 +661,7 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100); // Wait for confirmation thread resumed
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation thread resumed
 
 		// Also confirm that all threads are running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -722,8 +722,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-		eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-		eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected two threads but got " + threads.length, threads.length == 2);
@@ -737,7 +737,7 @@
 			}
 		});
 
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation that one thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation that one thread resumed
 
 		// Also confirm that only one threads is running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -756,7 +756,7 @@
 
 		// Make sure no other running event arrives
 		try {
-			eventWaitorRunning.waitForEvent(500);
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500));
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -777,8 +777,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-		eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-		eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected two threads but got " + threads.length, threads.length == 2);
@@ -792,8 +792,8 @@
 			}
 		});
 
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation first thread resumed
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation second thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation first thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation second thread resumed
 
 		// Also confirm that all threads are running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -818,12 +818,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected two threads but got " + threads.length, threads.length == 2);
@@ -838,7 +838,7 @@
 			}
 		});
 
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation one thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation one thread resumed
 
 		// Also confirm that all threads are running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -849,7 +849,7 @@
 		assertFalse("expected no threads to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no other running event arrives
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other running event arrives
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -869,12 +869,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -901,7 +901,7 @@
 		assertFalse("expected no threads to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no running events arrive
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -964,7 +964,7 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100);  // Thread should interrupt
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // Thread should interrupt
 
 		// Confirm that all threads are suspended
 		result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -988,8 +988,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-		eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-		eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected two threads but got " + threads.length, threads.length == 2);
@@ -1024,12 +1024,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected two threads but got " + threads.length, threads.length == 2);
@@ -1041,7 +1041,7 @@
 			}
 		});
 
-		eventWaitorStopped.waitForEvent(100); // Wait for confirmation one thread stopped
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation one thread stopped
 
 		// Also confirm that all threads are suspended
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -1066,12 +1066,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -1086,7 +1086,7 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100);  // confirm one thread was suspended
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // confirm one thread was suspended
 
 		// Also confirm that some but not all threads are suspended
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -1103,7 +1103,7 @@
 		assertFalse("expected that not all threads are suspended, but they are", result);
 
 		try {
-			eventWaitor.waitForEvent(500); // Make sure no other stopped event arrives
+			eventWaitor.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other stopped event arrives
 			fail("Got an unexpected stopped event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -1124,12 +1124,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -1143,8 +1143,8 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100);  // confirm one thread was suspended
-		eventWaitor.waitForEvent(100);  // confirm the other thread was suspended
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // confirm one thread was suspended
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // confirm the other thread was suspended
 
 		// Also confirm that all threads are suspended
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -1378,8 +1378,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IContainerDMContext[] processes =
 				new IContainerDMContext[] { SyncUtil.getContainerContext() };
@@ -1478,12 +1478,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IContainerDMContext[] processes =
 				new IContainerDMContext[] { SyncUtil.getContainerContext() };
@@ -1582,12 +1582,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -1885,8 +1885,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected a single thread but got " + threads.length, threads.length == 2);
@@ -1989,12 +1989,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected a single thread but got " + threads.length, threads.length == 2);
@@ -2097,12 +2097,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected a single thread but got " + threads.length, threads.length == 2);
@@ -2205,12 +2205,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -2322,8 +2322,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected a single thread but got " + threads.length, threads.length == 2);
@@ -2426,12 +2426,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IMIExecutionDMContext[] threads = SyncUtil.getExecutionContexts();
 		assertTrue("Expected a single thread but got " + threads.length, threads.length == 2);
@@ -2534,12 +2534,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -2651,7 +2651,7 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100); // Wait for confirmation process resumed
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation process resumed
 
 		// Also confirm that process is running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -2712,8 +2712,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-		eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-		eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IExecutionDMContext[] processes = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext() };
@@ -2727,8 +2727,8 @@
 			}
 		});
 
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation that one thread resumed
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation that second thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation that one thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation that second thread resumed
 
 		// Also confirm that all processes are running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -2753,12 +2753,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IExecutionDMContext[] processes = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext() };
@@ -2773,7 +2773,7 @@
 			}
 		});
 
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation one thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation one thread resumed
 
 		// Also confirm that all threads are running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -2784,7 +2784,7 @@
 		assertFalse("expected no process to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no other running event arrives
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other running event arrives
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -2804,12 +2804,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -2836,7 +2836,7 @@
 		assertFalse("expected no threads to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no running events arrive
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -2910,7 +2910,7 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100);  // Thread should interrupt
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // Thread should interrupt
 
 		// Confirm that all threads are suspended
 		result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -2934,8 +2934,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-		eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-		eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IExecutionDMContext[] processes = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext() };
@@ -2981,12 +2981,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IExecutionDMContext[] processes = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext() };
@@ -3001,7 +3001,7 @@
 			}
 		});
 
-		eventWaitorStopped.waitForEvent(100); // Wait for confirmation one thread stopped
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation one thread stopped
 
 		// Also confirm that all processes are suspended
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3034,12 +3034,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -3056,8 +3056,8 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100);  // confirm one thread was suspended
-		eventWaitor.waitForEvent(100);  // confirm the other thread was suspended
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // confirm one thread was suspended
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // confirm the other thread was suspended
 
 		// Also confirm that all processes are suspended
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3122,7 +3122,7 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100); // Wait for confirmation process resumed
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation process resumed
 
 		// Also confirm that process is running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3133,6 +3133,8 @@
 		assertFalse("expected no contexts to be suspended, but found some", result);
 
 		try {
+			// TODO: This Test is failing when using TestsPlugin.massageTimeout, 
+			// Investigate if the failure with massageTimeout is justified
 			eventWaitor.waitForEvent(500); // Make sure no running events arrive
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
@@ -3179,6 +3181,8 @@
 		assertFalse("expected no contexts to be suspended, but found some", result);
 
 		try {
+			// TODO: This Test is failing when using TestsPlugin.massageTimeout, 
+			// Investigate if the failure with massageTimeout is justified
 			eventWaitor.waitForEvent(500); // Make sure no running events arrive
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
@@ -3201,8 +3205,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-		eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-		eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IExecutionDMContext[] execDmcs = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext(), SyncUtil.getExecutionContext(0) };
@@ -3216,8 +3220,8 @@
 			}
 		});
 
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation that one thread resumed
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation that second thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation that one thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation that second thread resumed
 
 		// Also confirm that all processes are running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3228,7 +3232,7 @@
 		assertFalse("expected no process to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no running events arrive
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -3250,12 +3254,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IExecutionDMContext[] execDmcs = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext(), SyncUtil.getExecutionContext(0) };
@@ -3270,7 +3274,7 @@
 			}
 		});
 
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation one thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation one thread resumed
 
 		// Also confirm that all threads are running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3281,7 +3285,7 @@
 		assertFalse("expected no process to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no other running event arrives
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other running event arrives
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -3303,12 +3307,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IExecutionDMContext[] execDmcs = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext(), SyncUtil.getExecutionContext(1) };
@@ -3323,7 +3327,7 @@
 			}
 		});
 
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation one thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation one thread resumed
 
 		// Also confirm that all threads are running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3334,7 +3338,7 @@
 		assertFalse("expected no process to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no other running event arrives
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other running event arrives
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -3355,12 +3359,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -3387,7 +3391,7 @@
 		assertFalse("expected no threads to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no running events arrive
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -3463,7 +3467,7 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100);  // Thread should interrupt
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // Thread should interrupt
 
 		// Confirm that all threads are suspended
 		result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3488,8 +3492,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-		eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-		eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IExecutionDMContext[] execDmcs = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext(), SyncUtil.getExecutionContext(0) };
@@ -3536,12 +3540,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IExecutionDMContext[] execDmcs = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext(), SyncUtil.getExecutionContext(0) };
@@ -3556,7 +3560,7 @@
 			}
 		});
 
-		eventWaitorStopped.waitForEvent(100); // Wait for confirmation one thread stopped
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation one thread stopped
 
 		// Also confirm that all processes are suspended
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3590,12 +3594,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IExecutionDMContext[] execDmcs = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext(), SyncUtil.getExecutionContext(1) };
@@ -3610,7 +3614,7 @@
 			}
 		});
 
-		eventWaitorStopped.waitForEvent(100); // Wait for confirmation one thread stopped
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation one thread stopped
 
 		// Also confirm that all processes are suspended
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3644,12 +3648,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -3666,8 +3670,8 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100);  // confirm one thread was suspended
-		eventWaitor.waitForEvent(100);  // confirm the other thread was suspended
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // confirm one thread was suspended
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // confirm the other thread was suspended
 
 		// Also confirm that all processes are suspended
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3730,8 +3734,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-		eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-		eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IExecutionDMContext[] execDmcs = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext(), SyncUtil.getExecutionContext(0), SyncUtil.getExecutionContext(1) };
@@ -3745,8 +3749,8 @@
 			}
 		});
 
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation that one thread resumed
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation that second thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation that one thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation that second thread resumed
 
 		// Also confirm that all processes are running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3757,7 +3761,7 @@
 		assertFalse("expected no process to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no running events arrive
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -3779,12 +3783,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IExecutionDMContext[] execDmcs = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext(), SyncUtil.getExecutionContext(0), SyncUtil.getExecutionContext(1) };
@@ -3799,7 +3803,7 @@
 			}
 		});
 
-		eventWaitorRunning.waitForEvent(100); // Wait for confirmation one thread resumed
+		eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation one thread resumed
 
 		// Also confirm that all threads are running
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3810,7 +3814,7 @@
 		assertFalse("expected no process to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no other running event arrives
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other running event arrives
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -3831,12 +3835,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -3863,7 +3867,7 @@
 		assertFalse("expected no threads to be suspended, but found some", result);
 
 		try {
-			eventWaitorRunning.waitForEvent(500); // Make sure no running events arrive
+			eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
 			fail("Got an unexpected running event");
 		} catch (Exception e) {
 			// Timeout expected.  Success.
@@ -3888,8 +3892,8 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-		eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-		eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		final IExecutionDMContext[] execDmcs = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext(), SyncUtil.getExecutionContext(0), SyncUtil.getExecutionContext(1) };
@@ -3936,12 +3940,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitorStopped.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitorStopped.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		final IExecutionDMContext[] execDmcs = new IExecutionDMContext[] {
 				SyncUtil.getContainerContext(), SyncUtil.getExecutionContext(0), SyncUtil.getExecutionContext(1) };
@@ -3956,7 +3960,7 @@
 			}
 		});
 
-		eventWaitorStopped.waitForEvent(100); // Wait for confirmation one thread stopped
+		eventWaitorStopped.waitForEvent(TestsPlugin.massageTimeout(100)); // Wait for confirmation one thread stopped
 
 		// Also confirm that all processes are suspended
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {
@@ -3990,12 +3994,12 @@
                 new ServiceEventWaitor<MIStoppedEvent>(fMultiRun.getSession(), MIStoppedEvent.class);
 
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
-        eventWaitor.waitForEvent(2000); // Wait for second thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for second thread to stop
 
 		// Now resume program again and wait for one of the two threads to stop
 		SyncUtil.resumeAll();
-        eventWaitor.waitForEvent(2000); // Wait for first thread to stop
+        eventWaitor.waitForEvent(TestsPlugin.massageTimeout(2000)); // Wait for first thread to stop
 
 		// Now resume the thread again to have both running
 		SyncUtil.resumeAll();
@@ -4012,8 +4016,8 @@
 			}
 		});
 
-		eventWaitor.waitForEvent(100);  // confirm one thread was suspended
-		eventWaitor.waitForEvent(100);  // confirm the other thread was suspended
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // confirm one thread was suspended
+		eventWaitor.waitForEvent(TestsPlugin.massageTimeout(100));  // confirm the other thread was suspended
 
 		// Also confirm that all processes are suspended
 		Boolean result = runAsyncCall(new AsyncRunnable<Boolean>() {