Skip to content

Commit 644c9c9

Browse files
committed
Trigger explicit build in waitForProjects()
1 parent f82850a commit 644c9c9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • plugins/com.google.cloud.tools.eclipse.test.util/src/com/google/cloud/tools/eclipse/test/util/project

plugins/com.google.cloud.tools.eclipse.test.util/src/com/google/cloud/tools/eclipse/test/util/project/ProjectUtils.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import org.eclipse.core.resources.IResource;
4545
import org.eclipse.core.resources.IWorkspace;
4646
import org.eclipse.core.resources.IWorkspaceRoot;
47+
import org.eclipse.core.resources.IncrementalProjectBuilder;
4748
import org.eclipse.core.resources.ResourcesPlugin;
4849
import org.eclipse.core.runtime.CoreException;
4950
import org.eclipse.core.runtime.FileLocator;
@@ -203,6 +204,14 @@ public static void waitForProjects(Runnable delayTactic, IProject... projects) {
203204
Collection<Job> jobs = Collections.emptyList();
204205
Set<String> previousBuildErrors = Collections.emptySet();
205206
boolean buildErrorsChanging;
207+
for (IProject project : projects) {
208+
try {
209+
project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
210+
} catch (Exception ex) {
211+
System.err.printf("ProjectUtils#waitForProjects[%s]: error building %s: %s\n", timer,
212+
project, ex);
213+
}
214+
}
206215
do {
207216
// wait a little bit to give the builders a chance
208217
delayTactic.run();

0 commit comments

Comments
 (0)