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

Gradle integration test doesn't actually run the test #1532

Closed
jnizet opened this issue Mar 16, 2019 · 4 comments · Fixed by #1546
Closed

Gradle integration test doesn't actually run the test #1532

jnizet opened this issue Mar 16, 2019 · 4 comments · Fixed by #1546
Labels
Milestone

Comments

@jnizet
Copy link
Contributor

jnizet commented Mar 16, 2019

The gradle-it module has a test, but this test is never executed because the gradle test task isn't properly configured to useJUnitPlatform().

If the test tack is properly configured, then the test fails, due to #1458

Besides, the configuration testCompile used by the gradle build is deprecated. The correct configuration is testImplementation. See https://docs.gradle.org/current/userguide/dependency_management_for_java_projects.html and https://docs.gradle.org/current/userguide/java_plugin.html#tab:configurations

@stalep stalep added the area/gradle Gradle label Mar 17, 2019
@stalep
Copy link
Member

stalep commented Mar 17, 2019

I tested locally with adding:

test {
    useJUnitPlatform()
}

sourceSets {
  test {
    output.resourcesDir = file('target/test-classes')
    java.outputDir = file('target/test-classes')
  }
}

This gets past the PathTestHelper issue, but it still fails. Looking into it.

@jnizet
Copy link
Contributor Author

jnizet commented Mar 18, 2019

The change still hardcodes a single default location for the classes.
This location is incorrect if Kotlin is used.
And if both Java and Kotlin are used, Gradle will store classes in two separate directories, not just one.
I don't know why the locations need to be verified that way because I have no idea of what Quarkus needs to do with these classes, but am I right to say that:

  • given that these locations are hardcoded that way, you can't run tests from the IDE (since it stores classes in a different directory than Gradle/Maven)
  • you can't use any other language than Java (and Kotlin if fixed for Kotlin)
  • you can't have classes and test classes in separate Gradle/Maven projects/modules?

@gsmet gsmet added this to the 0.12.0 milestone Mar 19, 2019
@gsmet
Copy link
Member

gsmet commented Mar 19, 2019

@jnizet could you open another issue with all your (very valid) concerns? We knew it was a hack, we need to find a better solution but not sure it will be easy.

@jnizet
Copy link
Contributor Author

jnizet commented Mar 20, 2019

@gsmet I have created #1584

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 a pull request may close this issue.

3 participants