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

Fix test in sample gradle projects #14805

Merged
merged 1 commit into from
Feb 4, 2021
Merged

Conversation

glefloch
Copy link
Member

@glefloch glefloch commented Feb 3, 2021

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?

@ConfigProperty(name = "quarkus.application.version")
String appVersion;

close #14799

@ghost ghost added the area/gradle Gradle label Feb 3, 2021
@geoand
Copy link
Contributor

geoand commented Feb 3, 2021

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?

Yes, it's expected to not work in test mode.
So go ahead and remove the property from those tests

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@geoand geoand added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 3, 2021
@aloubyansky
Copy link
Member

Why are those properties expected not to be available in tests?

@geoand
Copy link
Contributor

geoand commented Feb 3, 2021

Because they are pulled from Maven or Gradle and in tests we can't reliably obtain that information

@aloubyansky
Copy link
Member

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.

@geoand
Copy link
Contributor

geoand commented Feb 3, 2021

Yeah, but in the tests that does not work properly AFAIR

@aloubyansky
Copy link
Member

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.

@geoand
Copy link
Contributor

geoand commented Feb 3, 2021

Then I guess we are just missing so glue code to make it work for tests as well :)

Copy link
Member

@aloubyansky aloubyansky left a comment

Choose a reason for hiding this comment

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

Thanks @glefloch

@glefloch glefloch merged commit 8c7b1b5 into quarkusio:master Feb 4, 2021
@ghost ghost added this to the 1.12 - master milestone Feb 4, 2021
@glefloch glefloch deleted the fix/14799 branch February 4, 2021 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gradle Gradle triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gradle tests appear to be failing
3 participants