Reverts tweaks to retry logic due to broken tests.
Reverts trunk@6743 and trunk@6739
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@6747 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/junit/JUnitMessageQueue.java b/user/src/com/google/gwt/junit/JUnitMessageQueue.java
index ddc8550..4c06882 100644
--- a/user/src/com/google/gwt/junit/JUnitMessageQueue.java
+++ b/user/src/com/google/gwt/junit/JUnitMessageQueue.java
@@ -57,20 +57,11 @@
}
}
- private static final Set<Class<? extends Throwable>> THROWABLES_NOT_RETRIED = createThrowablesNotRetried();
-
- private static Set<Class<? extends Throwable>> createThrowablesNotRetried() {
- Set<Class<? extends Throwable>> throwableSet = new HashSet<Class<? extends Throwable>>();
- throwableSet.add(com.google.gwt.junit.JUnitFatalLaunchException.class);
- throwableSet.add(java.lang.Error.class);
- return throwableSet;
- }
-
/**
* Records results for each client; must lock before accessing.
*/
private final Map<String, ClientStatus> clientStatuses = new HashMap<String, ClientStatus>();
-
+
/**
* A set of the GWT user agents (eg. ie6, gecko) that have connected.
*/
@@ -109,7 +100,7 @@
*/
JUnitMessageQueue() {
}
-
+
/**
* Called by the servlet to query for for the next block to test.
*
@@ -399,10 +390,9 @@
}
}
- /**
+ /*
* Returns true iff any there are no results, missing results, or any of the
- * test results is an exception other than those in {@code
- * THROWABLES_NOT_RETRIED}.
+ * test results is an exception other than JUnitFatalLaunchException.
*/
boolean needsRerunning(TestInfo testInfo) {
Map<String, JUnitResult> results = getResults(testInfo);
@@ -418,7 +408,8 @@
return true;
}
Throwable exception = result.getException();
- if (exception != null && !isMember(exception, THROWABLES_NOT_RETRIED)) {
+ if (exception != null
+ && !(exception instanceof JUnitFatalLaunchException)) {
return true;
}
}
@@ -470,7 +461,7 @@
}
return clientStatus;
}
-
+
/**
* Get the map of test results from all clients for a given {@link TestInfo},
* creating it if necessary.
@@ -486,13 +477,4 @@
}
return results;
}
-
- private boolean isMember(Throwable exception, Set<Class<? extends Throwable>> throwableSet) {
- for (Class<? extends Throwable> throwable : throwableSet) {
- if (throwable.isInstance(exception)) {
- return true;
- }
- }
- return false;
- }
}
diff --git a/user/test/com/google/gwt/junit/JUnitMessageQueueTest.java b/user/test/com/google/gwt/junit/JUnitMessageQueueTest.java
index 96dd50b..d7f7058 100644
--- a/user/test/com/google/gwt/junit/JUnitMessageQueueTest.java
+++ b/user/test/com/google/gwt/junit/JUnitMessageQueueTest.java
@@ -15,7 +15,6 @@
*/
package com.google.gwt.junit;
-import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.junit.client.impl.JUnitResult;
import com.google.gwt.junit.client.impl.JUnitHost.TestBlock;
import com.google.gwt.junit.client.impl.JUnitHost.TestInfo;
@@ -354,7 +353,7 @@
TestInfo testInfo = queue.getTestBlocks().get(0)[0];
Map<TestInfo, JUnitResult> results = new HashMap<TestInfo, JUnitResult>();
JUnitResult junitResult = new JUnitResult();
- junitResult.setException(new UnableToCompleteException());
+ junitResult.setException(new AssertionError());
results.put(testInfo, junitResult);
queue.reportResults("client0", "ie6", results);
results = new HashMap<TestInfo, JUnitResult>();