Skip to content

Commit

Permalink
Add better error feddback to ClasspathUpdaterTest
Browse files Browse the repository at this point in the history
Currently the ClasspathUpdaterTest just complains that the update has
failed but the user has no chance to see what's wrong.

Thats especially annoying as the test randomly fails.
  • Loading branch information
laeubi committed Oct 22, 2023
1 parent 6790bd3 commit 99eeff9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.IClasspathAttribute;
import org.eclipse.jdt.core.IClasspathEntry;
Expand Down Expand Up @@ -180,7 +181,8 @@ private void runUpdateClasspathJob() throws InterruptedException {
IPluginModelBase model = PluginRegistry.findModel(project.getProject());
Job job = UpdateClasspathJob.scheduleFor(List.of(model), false);
job.join();
assertTrue("Update Classpath Job failed", job.getResult().isOK());
IStatus result = job.getResult();
assertTrue("Update Classpath Job failed: " + result, result.isOK());
}

private <T> void assertClasspathAttribute(String entryName, String attrName, T expectedValue,
Expand Down

0 comments on commit 99eeff9

Please sign in to comment.