Skip to content

Commit f1109ea

Browse files
committed
Revert "GEODE-10490: Fix Gradle build system compatibility and test task resolution"
This reverts commit 7b279b1.
1 parent 7b279b1 commit f1109ea

File tree

14 files changed

+29
-219
lines changed

14 files changed

+29
-219
lines changed

build-tools/scripts/src/main/groovy/geode-test.gradle

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -75,25 +75,6 @@ facets {
7575
}
7676
}
7777

78-
// Ensure test tasks exist immediately after facets configuration
79-
['integrationTest', 'distributedTest', 'performanceTest', 'acceptanceTest', 'uiTest', 'upgradeTest'].each { taskName ->
80-
if (!tasks.findByName(taskName)) {
81-
tasks.create(taskName, Test) {
82-
description = "Stub ${taskName} tests (created for CI compatibility)"
83-
group = 'verification'
84-
useJUnitPlatform()
85-
testClassesDirs = files()
86-
classpath = configurations.testRuntimeClasspath
87-
88-
// Skip if no tests to run
89-
onlyIf {
90-
!testClassesDirs.isEmpty()
91-
}
92-
}
93-
logger.info("Created stub test task '${taskName}' for project ${project.name}")
94-
}
95-
}
96-
9778
dependencies {
9879
// Do not add dependencies here that are not part of a custom configuration.
9980
// Dependencies should be explicit in the relevant build.gradle files to keep our modules

build-tools/scripts/src/main/groovy/standard-subproject-configuration.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
plugins {
1919
id 'geode-java'
2020
id 'dependency-resolution'
21-
id 'nebula.facet'
2221
id 'geode-test'
2322
id 'code-analysis'
2423
id 'multi-process-test'

build.gradle

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -125,31 +125,6 @@ tasks.register('test') {
125125
description "An all-project target for unit tests"
126126
}
127127

128-
tasks.register('integrationTest') {
129-
description "An all-project target for integration tests"
130-
group 'verification'
131-
}
132-
133-
tasks.register('distributedTest') {
134-
description "An all-project target for distributed tests"
135-
group 'verification'
136-
}
137-
138-
tasks.register('performanceTest') {
139-
description "An all-project target for performance tests"
140-
group 'verification'
141-
}
142-
143-
tasks.register('uiTest') {
144-
description "An all-project target for UI tests"
145-
group 'verification'
146-
}
147-
148-
tasks.register('upgradeTest') {
149-
description "An all-project target for upgrade tests"
150-
group 'verification'
151-
}
152-
153128
tasks.register('acceptanceTest') {
154129
description "An all-project target for acceptance tests"
155130
group 'verification'
@@ -161,15 +136,12 @@ tasks.register('acceptanceTest') {
161136

162137
// Configure dependencies after evaluation when tasks are fully configured
163138
gradle.projectsEvaluated {
164-
def testTaskNames = ['integrationTest', 'distributedTest', 'performanceTest', 'uiTest', 'upgradeTest', 'acceptanceTest']
165-
testTaskNames.each { testTaskName ->
166-
def rootTestTask = tasks.getByName(testTaskName)
167-
subprojects.each { subproject ->
168-
def subprojectTestTask = subproject.tasks.findByName(testTaskName)
169-
if (subprojectTestTask) {
170-
rootTestTask.dependsOn subprojectTestTask
171-
println "Adding dependency on ${subproject.path}:${testTaskName}"
172-
}
139+
def rootAcceptanceTest = tasks.getByName('acceptanceTest')
140+
subprojects.each { subproject ->
141+
def acceptanceTestTask = subproject.tasks.findByName('acceptanceTest')
142+
if (acceptanceTestTask) {
143+
rootAcceptanceTest.dependsOn acceptanceTestTask
144+
println "Adding dependency on ${subproject.path}:acceptanceTest"
173145
}
174146
}
175147
}

dependency_classpath.txt

Lines changed: 0 additions & 93 deletions
This file was deleted.

geode-assembly/build.gradle

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -44,37 +44,6 @@ project.ext.set('constrainVersionInBom', false)
4444

4545
project.ext {artifactName = 'apache-geode'}
4646

47-
// Create missing test tasks that CI workflows reference
48-
if (!tasks.findByName('distributedTest')) {
49-
tasks.create('distributedTest', Test) {
50-
description = "Runs distributedTest tests (created for CI compatibility)"
51-
group = 'verification'
52-
useJUnitPlatform()
53-
testClassesDirs = files()
54-
classpath = configurations.testRuntimeClasspath
55-
56-
// Skip if no tests to run
57-
onlyIf {
58-
!testClassesDirs.isEmpty()
59-
}
60-
}
61-
}
62-
63-
if (!tasks.findByName('integrationTest')) {
64-
tasks.create('integrationTest', Test) {
65-
description = "Runs integrationTest tests (created for CI compatibility)"
66-
group = 'verification'
67-
useJUnitPlatform()
68-
testClassesDirs = files()
69-
classpath = configurations.testRuntimeClasspath
70-
71-
// Skip if no tests to run
72-
onlyIf {
73-
!testClassesDirs.isEmpty()
74-
}
75-
}
76-
}
77-
7847
configurations {
7948
compositeTarget {
8049
setDescription("Composite builds wishing to consume this apache-geode@tgz artifact must specify \"targetConfiguration = 'compositeTarget'\" for correct composite task dependency detection.")
@@ -147,14 +116,11 @@ repositories {
147116
def webServersDir = "$buildDir/generated-resources/webservers"
148117

149118
sourceSets {
150-
// Configure distributedTest source set if it exists
151-
if (findByName('distributedTest')) {
152-
distributedTest {
153-
resources {
154-
srcDirs webServersDir
155-
}
156-
output.dir(webServersDir, builtBy: 'downloadWebServers')
119+
tasks.matching { it.name == 'distributedTest' }.configureEach {
120+
resources {
121+
srcDirs webServersDir
157122
}
123+
output.dir(webServersDir, builtBy: 'downloadWebServers')
158124
}
159125
}
160126

geode-connectors/build.gradle

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,11 @@ configurations {
3232
}
3333
def jdbcJarsDir = "$buildDir/generated-resources/jdbcJars"
3434
sourceSets {
35-
// Configure distributedTest source set if it exists
36-
if (findByName('distributedTest')) {
37-
distributedTest {
38-
resources {
39-
srcDirs jdbcJarsDir
40-
}
41-
output.dir(jdbcJarsDir, builtBy: 'downloadJdbcJars')
35+
tasks.matching { it.name == 'distributedTest' }.configureEach {
36+
resources {
37+
srcDirs jdbcJarsDir
4238
}
39+
output.dir(jdbcJarsDir, builtBy: 'downloadJdbcJars')
4340
}
4441
}
4542
task downloadJdbcJars(type:Copy) {

geode-core/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ sourceSets {
6565
// This works around resource-look up between integrationTest and test source-sets.
6666
// See GEODE-5803 / GEODE-5882
6767
test.resources.srcDirs.each { testResourceSrc ->
68-
// Check if integrationTest source set exists, not task
69-
if (sourceSets.findByName('integrationTest')) {
70-
integrationTest.resources.srcDir {
68+
def integrationTestTask = tasks.findByName('integrationTest')
69+
if (integrationTestTask) {
70+
integrationTestTask.resources.srcDir {
7171
testResourceSrc
7272
}
7373
}
-71 Bytes
Binary file not shown.

geode-lucene/null#_testRegion_0/write.lock

Whitespace-only changes.
-71 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)