Skip to content

Commit 387bec3

Browse files
committed
Remove Unnecessary Gradle Test Task Dependencies
The `quarkusIntTest` and `quarkusNativeTest` tasks do not use the output of the test task, so these tasks should not specify the `test` task as a dependency. Instead, these tasks now have a `shouldRunAfter` relationship to the test task, because ideally unit tests should run before performing heavier testing. Fixes #44383
1 parent 8ca3d17 commit 387bec3

File tree

1 file changed

+4
-2
lines changed
  • devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle

1 file changed

+4
-2
lines changed

devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ public boolean isSatisfiedBy(Task t) {
424424
tasks.register(INTEGRATION_TEST_TASK_NAME, Test.class, intTestTask -> {
425425
intTestTask.setGroup("verification");
426426
intTestTask.setDescription("Runs Quarkus integration tests");
427-
intTestTask.dependsOn(quarkusBuild, testTask);
427+
intTestTask.dependsOn(quarkusBuild);
428+
intTestTask.shouldRunAfter(testTask);
428429
intTestTask.setClasspath(intTestClasspath);
429430
intTestTask.setTestClassesDirs(intTestSourceOutputClasses);
430431
});
@@ -449,7 +450,8 @@ public boolean isSatisfiedBy(Task t) {
449450
tasks.register(TEST_NATIVE_TASK_NAME, Test.class, testNative -> {
450451
testNative.setDescription("Runs native image tests");
451452
testNative.setGroup("verification");
452-
testNative.dependsOn(quarkusBuild, testTask);
453+
testNative.dependsOn(quarkusBuild);
454+
testNative.shouldRunAfter(testTask);
453455
testNative.setClasspath(nativeTestClasspath);
454456
testNative.setTestClassesDirs(nativeTestClassesDirs);
455457
});

0 commit comments

Comments
 (0)