From 21f18e02c26a40140f5c8708bfa0cd52df0bf2e8 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Wed, 20 May 2020 19:20:23 -0700 Subject: [PATCH] Make internalClusterTest run after unit tests (#57016) This commit adds an ordering rule to ensure unit tests are run first when running a higher level task like check. --- .../main/java/org/elasticsearch/gradle/util/GradleUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildSrc/src/main/java/org/elasticsearch/gradle/util/GradleUtils.java b/buildSrc/src/main/java/org/elasticsearch/gradle/util/GradleUtils.java index 84acea7932721..dc9a101f64b57 100644 --- a/buildSrc/src/main/java/org/elasticsearch/gradle/util/GradleUtils.java +++ b/buildSrc/src/main/java/org/elasticsearch/gradle/util/GradleUtils.java @@ -152,6 +152,8 @@ public static TaskProvider addTestSourceSet(Project project, String sourceSet task.setGroup(JavaBasePlugin.VERIFICATION_GROUP); task.setTestClassesDirs(testSourceSet.getOutput().getClassesDirs()); task.setClasspath(testSourceSet.getRuntimeClasspath()); + // make the new test run after unit tests + task.mustRunAfter(project.getTasks().named("test")); }); Configuration testCompileConfig = project.getConfigurations().getByName(testSourceSet.getCompileClasspathConfigurationName());