From cb4ec0d3364dc85dbce557c30f4d09aed5e4181a Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Tue, 20 Apr 2021 09:58:53 +1000 Subject: [PATCH] Fix test issue --- .../java/io/quarkus/gradle/builder/QuarkusModelBuilder.java | 2 +- .../java/io/quarkus/gradle/InjectBeanFromTestConfigTest.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/devtools/gradle/src/main/java/io/quarkus/gradle/builder/QuarkusModelBuilder.java b/devtools/gradle/src/main/java/io/quarkus/gradle/builder/QuarkusModelBuilder.java index 0aa77cd2df3c4..203f410d53518 100644 --- a/devtools/gradle/src/main/java/io/quarkus/gradle/builder/QuarkusModelBuilder.java +++ b/devtools/gradle/src/main/java/io/quarkus/gradle/builder/QuarkusModelBuilder.java @@ -352,7 +352,7 @@ private void collectDependencies(ResolvedConfiguration configuration, if ((LaunchMode.DEVELOPMENT.equals(mode) || LaunchMode.TEST.equals(mode)) && a.getId().getComponentIdentifier() instanceof ProjectComponentIdentifier) { IncludedBuild includedBuild = includedBuild(project, a.getName()); - if ("test-fixtures".equals(a.getClassifier())) { + if ("test-fixtures".equals(a.getClassifier()) || "test".equals(a.getClassifier())) { //TODO: test-fixtures are broken under the new ClassLoading model dep.addPath(a.getFile()); } else { diff --git a/integration-tests/gradle/src/test/java/io/quarkus/gradle/InjectBeanFromTestConfigTest.java b/integration-tests/gradle/src/test/java/io/quarkus/gradle/InjectBeanFromTestConfigTest.java index ed2238c0f0311..b052e66a3f05c 100644 --- a/integration-tests/gradle/src/test/java/io/quarkus/gradle/InjectBeanFromTestConfigTest.java +++ b/integration-tests/gradle/src/test/java/io/quarkus/gradle/InjectBeanFromTestConfigTest.java @@ -1,5 +1,7 @@ package io.quarkus.gradle; +import static org.assertj.core.api.Assertions.assertThat; + import java.io.File; import org.junit.jupiter.api.Test; @@ -11,6 +13,7 @@ public void testBasicMultiModuleBuild() throws Exception { final File projectDir = getProjectDir("inject-bean-from-test-config"); - runGradleWrapper(projectDir, "clean", ":application:test"); + BuildResult build = runGradleWrapper(projectDir, "clean", ":application:test"); + assertThat(build.getTasks().get(":application:test")).isEqualTo(BuildResult.SUCCESS_OUTCOME); } }