make test cases more robust
diff --git a/tests/org.eclipse.wst.common.tests.validation/plugin.xml b/tests/org.eclipse.wst.common.tests.validation/plugin.xml
index b90bf2e..8f3378f 100644
--- a/tests/org.eclipse.wst.common.tests.validation/plugin.xml
+++ b/tests/org.eclipse.wst.common.tests.validation/plugin.xml
@@ -190,5 +190,33 @@
          </include>
       </validator>
      </extension>
+ <extension
+       id="t2a"
+       name="T2A"
+       point="org.eclipse.wst.validation.validator">
+    <validator>
+       <helper
+             class="org.eclipse.wst.validation.tests.T2AHelper">
+       </helper>
+       <run
+             class="org.eclipse.wst.validation.tests.T2A"
+             enabled="false">
+       </run>
+    </validator>
+ </extension>
+ <extension
+       id="t2b"
+       name="T2B"
+       point="org.eclipse.wst.validation.validator">
+    <validator>
+       <helper
+             class="org.eclipse.wst.validation.tests.T2AHelper">
+       </helper>
+       <run
+             class="org.eclipse.wst.validation.tests.T2B"
+             enabled="false">
+       </run>
+    </validator>
+ </extension>
  
 </plugin>
diff --git a/tests/org.eclipse.wst.common.tests.validation/src/org/eclipse/wst/validation/tests/testcase/TestSuite1.java b/tests/org.eclipse.wst.common.tests.validation/src/org/eclipse/wst/validation/tests/testcase/TestSuite1.java
index a5dd3e4..feeb2cf 100644
--- a/tests/org.eclipse.wst.common.tests.validation/src/org/eclipse/wst/validation/tests/testcase/TestSuite1.java
+++ b/tests/org.eclipse.wst.common.tests.validation/src/org/eclipse/wst/validation/tests/testcase/TestSuite1.java
@@ -160,6 +160,7 @@
 		ByteArrayInputStream in = new ByteArrayInputStream("map t1error error\nmap t1warning warning".getBytes());
 		_mapTest1.setContents(in, true, true, monitor);
 		
+		Thread.sleep(2000);  // we need to sleep here to give the "finished" job a chance to run.
 		TestValidator4.getCounters().reset();
 		TestValidator5D.getCounters().reset();
 		_env.incrementalBuild();
@@ -208,6 +209,18 @@
 	}
 	
 	/**
+	 * Count the number of test validators.
+	 */
+	public void testCountValidators(){
+		int count = 0;
+		for (Validator v : ValManager.getDefault().getValidators()){
+			int i = v.getId().indexOf(".Test");
+			if (i != -1)count++;
+		}
+		assertEquals("Expected there to be 7 Test validators", 7, count);
+	}
+	
+	/**
 	 * Test if we can get a message that was defined through the extension point.
 	 */
 	public void testMessages() {
@@ -220,33 +233,55 @@
 		assertEquals(4, v.getMessageSettings().size());
 	}
 	
+//	public void testSerialize(){
+//		Serializer s = new Serializer(20);
+//		s.put(true);
+//		s.put(false);
+//		s.put("Hi there");
+//		s.put(25);
+//		String test = s.toString();
+//		
+//		Deserializer d = new Deserializer(test);
+//		assertTrue(d.getBoolean());
+//		assertFalse(d.getBoolean());
+//		assertEquals("Hi there", d.getString());
+//		assertTrue(d.hasNext());
+//		assertEquals(25, d.getInt());
+//		assertFalse(d.hasNext());
+//	}
+	
 	public void testSuspend() throws CoreException, InterruptedException {
 		ValidationFramework vf = ValidationFramework.getDefault();
+		Validator v = vf.getValidator(TestValidator6.id(), null);
+		TestValidator6 t6 = (TestValidator6)v.asV2Validator().getValidator();
+		
+		v = vf.getValidator(TestValidator7.id(), null);
+		TestValidator7 t7 = (TestValidator7)v.asV2Validator().getValidator();
+		t7.reset();
+		
 		long start = System.currentTimeMillis();
 		_env.fullBuild();
-		
+		Thread.sleep(1000);
 		vf.join(null);
 		long first = System.currentTimeMillis();
 		long valBuild = first-start;
 		assertTrue("We expect the build to take longer than 3s, but it completed in " + valBuild + "ms", valBuild > 3000);
 		
-		Validator v = vf.getValidator(TestValidator6.id(), null);
-		TestValidator6 t6 = (TestValidator6)v.asV2Validator().getValidator();
 		IResource projectFile = _testProject.findMember(".project");
 		assertFalse("We should not be validating the .product file", t6.getSet().contains(projectFile));
 		
-		v = vf.getValidator(TestValidator7.id(), null);
-		TestValidator7 t7 = (TestValidator7)v.asV2Validator().getValidator();
 		assertEquals("We expected the validation to be suspended after the first call", 1, t7.getSet().size());
 		
 		vf.suspendAllValidation(true);
 		_env.fullBuild();
+		Thread.sleep(1000);
 		vf.join(null);
 		long second = System.currentTimeMillis();
 		vf.suspendAllValidation(false);
 		long novalBuild = second - first;
 		assertTrue("We except the build to go faster with validation turned off, but it was " + (novalBuild-valBuild) +
 				" ms faster" , novalBuild < valBuild);
+		assertEquals("We expected the validation to be suspended after the first call", 1, t7.getSet().size());
 
 	}
 	
diff --git a/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T2A.java b/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T2A.java
new file mode 100644
index 0000000..9296269
--- /dev/null
+++ b/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T2A.java
@@ -0,0 +1,23 @@
+package org.eclipse.wst.validation.tests;
+
+import org.eclipse.wst.validation.internal.core.ValidationException;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+
+/**
+ * A V1 validator that is off by default.
+ * @author karasiuk
+ *
+ */
+public class T2A implements IValidator {
+
+	public void cleanup(IReporter reporter) {
+	}
+
+	public void validate(IValidationContext helper, IReporter reporter)
+			throws ValidationException {
+		String[] uris = helper.getURIs();
+	}
+
+}
diff --git a/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T2AHelper.java b/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T2AHelper.java
new file mode 100644
index 0000000..7bdced7
--- /dev/null
+++ b/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T2AHelper.java
@@ -0,0 +1,26 @@
+package org.eclipse.wst.validation.tests;
+
+import org.eclipse.wst.validation.internal.Tracing;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+
+public class T2AHelper implements IValidationContext {
+
+	public String[] getURIs() {
+		return null;
+	}
+
+	public Object loadModel(String symbolicName) {
+		logit("T2AHelper#loadModule: " + symbolicName);
+		return null;
+	}
+
+	public Object loadModel(String symbolicName, Object[] parms) {
+		logit("T2AHelper#loadModule2: " + symbolicName);
+		return null;
+	}
+	
+	private void logit(String line){
+		Tracing.log(line);
+	}
+
+}
diff --git a/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T2B.java b/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T2B.java
new file mode 100644
index 0000000..69f14ae
--- /dev/null
+++ b/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/T2B.java
@@ -0,0 +1,24 @@
+package org.eclipse.wst.validation.tests;
+
+import org.eclipse.wst.validation.internal.core.ValidationException;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+
+/**
+ * A V1 validator that is on by default.
+ * @author karasiuk
+ *
+ */
+public class T2B implements IValidator {
+
+	public void cleanup(IReporter reporter) {
+	}
+
+	public void validate(IValidationContext helper, IReporter reporter)
+			throws ValidationException {
+		String[] uris = helper.getURIs();
+		
+	}
+
+}
diff --git a/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/TestValidator7.java b/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/TestValidator7.java
index d6546c6..35ade9f 100644
--- a/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/TestValidator7.java
+++ b/tests/org.eclipse.wst.common.tests.validation/validators/org/eclipse/wst/validation/tests/TestValidator7.java
@@ -20,7 +20,6 @@
 	public static String id(){
 		return Activator.PLUGIN_ID +".Test7";
 	}
-
 	
 	private Set<IResource> _set = new HashSet<IResource>(100);
 	
@@ -35,5 +34,9 @@
 	public Set<IResource> getSet() {
 		return _set;
 	}
+	
+	public void reset(){
+		_set.clear();
+	}
 
 }