Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProjectUtils.waitUntilNoBuildErrors(project); times out #3567

Closed
elharo opened this issue Dec 4, 2019 · 4 comments
Closed

ProjectUtils.waitUntilNoBuildErrors(project); times out #3567

elharo opened this issue Dec 4, 2019 · 4 comments

Comments

@elharo
Copy link
Contributor

elharo commented Dec 4, 2019

We got blocked for over a week because ProjectUtils.waitUntilNoBuildErrors(project) doesn't fail sensibly and times out, which leads to undiagnosable, incomprehensible stack traces in the log.

This method shouldn't wait more than the resonable number of seconds to build. Then, rather than timing out, it should fail (Assert.fail) with an error that indicates the build errors found in the project.

@chanseokoh
Copy link
Contributor

That is weird. The code is supposed to return false after 300 seconds.

        } else if (elapsed.elapsed(TimeUnit.SECONDS) > 300) {
          return false;
        }

And then for example, we have code like this to call failBuildErrors().

    if (checkBuildErrors) {
      waitUntilNoBuildErrors();
      // changed from specific projects to see all possible errors
      failIfBuildErrors("Imported projects have errors");
    }

@elharo
Copy link
Contributor Author

elharo commented Dec 4, 2019

It could be some issue with the combination of Eclipse 4.9/Java 11. That's where this regularly broke (not failed).

300 seconds is probably way too long. Perhaps we could just drop that to 120 seconds.

@chanseokoh
Copy link
Contributor

chanseokoh commented Dec 6, 2019

Maybe waitUntilNoBuildErrors() should accept a timeout value. My memory is hazy, but it is possible that I set it to 300 seconds on purpose. One place where this is used is an integration test importing a project. And I remember importing a Spring Boot projects can really take a lot of time since it often has to download a ton of dependencies if .m2 repo is empty. And building the entire project can also take a considerable amount of time in slow CI/CE environment.

@JoeWang1127
Copy link

close as obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants