JUnitShell should never refresh modules; it's not necesary and can lead to race conditions.
Review by: jlabanca (desk)
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@6947 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/junit/CompileStrategy.java b/user/src/com/google/gwt/junit/CompileStrategy.java
index d955e6f..e1db74d 100644
--- a/user/src/com/google/gwt/junit/CompileStrategy.java
+++ b/user/src/com/google/gwt/junit/CompileStrategy.java
@@ -168,7 +168,7 @@
*/
ModuleDef moduleDef = ModuleDefLoader.createSyntheticModule(treeLogger,
syntheticModuleName, new String[] {
- moduleName, strategy.getModuleInherit()}, true);
+ moduleName, strategy.getModuleInherit()}, false);
// Replace any user entry points with our test runner.
moduleDef.clearEntryPoints();
diff --git a/user/src/com/google/gwt/junit/JUnitShell.java b/user/src/com/google/gwt/junit/JUnitShell.java
index 07ba2e4..d564ae5 100644
--- a/user/src/com/google/gwt/junit/JUnitShell.java
+++ b/user/src/com/google/gwt/junit/JUnitShell.java
@@ -795,6 +795,13 @@
}
}
+ @Override
+ protected ModuleDef loadModule(TreeLogger logger, String moduleName,
+ boolean refresh) throws UnableToCompleteException {
+ // Never refresh modules in JUnit.
+ return super.loadModule(logger, moduleName, false);
+ }
+
/**
* Checks to see if this test run is complete.
*/