improved error diagnostics

This commit is contained in:
Kohsuke Kawaguchi committed 2012-05-29 11:37:09 -07:00
1 parent e69aa12151
commit 242e682e62
2 files changed
+7 -4

No files matched your search

@@ -64,7 +64,10 @@ public class TestPluginManager extends PluginManager {
protected Collection<String> loadBundledPlugins() throws Exception {
Set<String> names = new HashSet<String>();
File[] children = new File(WarExploder.getExplodedDir(),"WEB-INF/plugins").listFiles();
File bundledPlugins = new File(WarExploder.getExplodedDir(), "WEB-INF/plugins");
File[] children = bundledPlugins.listFiles();
if (children==null)
throw new Error("Unable to find "+bundledPlugins);
for (File child : children) {
try {
names.add(child.getName());
@@ -80,11 +80,11 @@ final class WarExploder {
}
}
// locate hudson.war
// locate jenkins.war
URL winstone = WarExploder.class.getResource("/winstone.jar");
if(winstone==null)
// impossible, since the test harness pulls in hudson.war
throw new AssertionError("jenkins.war is not in the classpath.");
// impossible, since the test harness pulls in jenkins.war
throw new AssertionError("jenkins.war is not in the classpath. If you are running this from the core workspace, run 'mvn install' to create the war image in war/target/jenkins");
File war = Which.jarFile(Class.forName("executable.Executable"));
File explodeDir = new File("./target/jenkins-for-test").getAbsoluteFile();