-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix test in sample gradle projects #14805
Conversation
Yes, it's expected to not work in test mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
Why are those properties expected not to be available in tests? |
Because they are pulled from Maven or Gradle and in tests we can't reliably obtain that information |
The name and the version? Unless the props are explicitly set by the user they are initialized to the runner module's artifactId and version. |
Yeah, but in the tests that does not work properly AFAIR |
The project's artifactId/name and version? If we didn't have that info we wouldn't be able to resolve dependencies and set up the classpath. |
Then I guess we are just missing so glue code to make it work for tests as well :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @glefloch
This branch fix sample gradle projects used by integration-test.
I also added an assertion on the command result to make sure we detect this ASAP, even if logs are off.
Also, this config injection works in dev mode, but fails on test. As these tests are only testing
add
/remove
extension, I simply removed the property injection. @geoand is a normal behaviour?close #14799