Author: rob.stryker(a)jboss.com
Date: 2009-06-11 07:07:58 -0400 (Thu, 11 Jun 2009)
New Revision: 15873
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/ui/BuildActionTest.java
Log:
project greenbuild
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/ui/BuildActionTest.java
===================================================================
---
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/ui/BuildActionTest.java 2009-06-11
08:02:25 UTC (rev 15872)
+++
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/ui/BuildActionTest.java 2009-06-11
11:07:58 UTC (rev 15873)
@@ -16,6 +16,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
@@ -72,7 +73,7 @@
return jobChangeAdapter;
}
- public void testBuildAction() {
+ public void testBuildAction() throws Exception {
ArchivesModel.instance().registerProject(project.getLocation(), new
NullProgressMonitor());
BuildAction action = new BuildAction();
waiting = true;
@@ -108,7 +109,7 @@
waitForGo();
}
- protected void waitForGo() throws RuntimeException {
+ protected void waitForGo() throws Exception {
if( !scheduled )
fail("Job not scheduled");
while(waiting)
@@ -120,7 +121,15 @@
waiting = true;
scheduled = false;
- if( ce != null )
- throw new RuntimeException(ce);
+ if( ce != null ) {
+ IStatus s = ce.getStatus();
+ String message = s.getMessage() + '\n';
+ if( s instanceof MultiStatus ) {
+ IStatus[] children = ((MultiStatus)s).getChildren();
+ for( int i = 0; i < children.length; i++ )
+ message += children[i].getMessage() + '\n';
+ }
+ fail(message);
+ }
}
}
Show replies by date