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

#1437: play auto-test can return an exit code of zero when the te… #1435

Merged

Conversation

tstedman
Copy link

@tstedman tstedman commented Dec 28, 2022

…sts do not run

Pull Request Checklist

Helpful things

Fixes

git hub issue #1437
play auto-test can return an exit code of zero when the tests do not run due to the application failing to start. This can occur as a result of an unhandled exception when initializing a module or a compiler error within the application.

Purpose

Exists with return value of -1 when tests have not run.

Background Context

Jenkins was not reporting errors with play projects, was reporting everything working, even though tests were failing to run.

References

#1437

@@ -148,12 +148,20 @@ def autotest(app, args):
opener.open('%s://localhost:%s/@kill' % (protocol, http_port))
except Exception as e:
pass


testCompleted = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion introducing the new variable is not necessary. The testspassed (line 157) should be used instead.

Copy link
Author

@tstedman tstedman Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, it can be solved with one variable. Agreed, it is a matter of opinion whether it should be included. My reasoning for providing it was to speak to three potential states of interest: 1) tests failed to run; 2) tests ran but failed; and 3) tests ran and passed. A single boolean loses this level of resolution. Whatever you decide to do here is fine with me.

@xael-fry xael-fry changed the title issue #59: play auto-test can return an exit code of zero when the te… #1437: play auto-test can return an exit code of zero when the te… Jul 15, 2023
@xael-fry xael-fry added this to the 1.8.0 milestone Jul 15, 2023
@xael-fry xael-fry merged commit f8812ce into playframework:master Jul 15, 2023
@xael-fry
Copy link
Member

Merged in master
thanks @tstedman

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

Successfully merging this pull request may close these issues.

4 participants