Skip to content

Commit

Permalink
GEODE-9284: only upgradeTest should need geode-old-versions (apache#6492
Browse files Browse the repository at this point in the history
)

make test-target not automatically download old versions
move tests that need old-versions into upgradeTest

Authored-by: Robert Houghton <[email protected]>
  • Loading branch information
robbadler authored May 21, 2021
1 parent e0d028c commit 3515100
Show file tree
Hide file tree
Showing 32 changed files with 45 additions and 39 deletions.
2 changes: 0 additions & 2 deletions extensions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
19 changes: 10 additions & 9 deletions geode-assembly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ dependencies {
testImplementation(project(':geode-log4j')) {
exclude module: 'geode-core'
}

acceptanceTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
testImplementation('org.assertj:assertj-core')

integrationTestImplementation(project(':geode-core'))
integrationTestImplementation(project(':geode-membership'))
Expand All @@ -213,7 +212,6 @@ dependencies {
integrationTestImplementation('javax.annotation:javax.annotation-api')
integrationTestImplementation('javax.servlet:javax.servlet-api')

integrationTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))

integrationTestRuntimeOnly('io.swagger:swagger-annotations')
// these two modules are for testing only
Expand Down Expand Up @@ -290,14 +288,13 @@ dependencies {
}
upgradeTestImplementation(project(':geode-assembly:geode-assembly-test'))

upgradeTestImplementation('org.apache.httpcomponents:httpclient')

upgradeTestCompileOnly(platform(project(':boms:geode-all-bom')))
upgradeTestCompileOnly('io.swagger:swagger-annotations')
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
distributedTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
testImplementation('org.assertj:assertj-core')
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))
upgradeTestRuntimeOnly(project(':extensions:session-testing-war'))
upgradeTestRuntimeOnly('org.codehaus.cargo:cargo-core-uberjar')
upgradeTestRuntimeOnly('org.apache.httpcomponents:httpclient')
upgradeTestRuntimeOnly files({ downloadWebServers } )

//Web servers used for session module testing
Expand Down Expand Up @@ -620,8 +617,14 @@ distributions {
// Make build final task to generate all test and product resources
build.dependsOn(installDist)

def spotlessProjects = rootProject.subprojects.findAll { subproj ->
subproj.plugins.hasPlugin('com.diffplug.spotless')
}
tasks.named('srcDistTar').configure {
classifier 'src'
spotlessProjects.each {spotlessProj ->
dependsOn {spotlessProj.tasks.named("spotlessApply")}
}
}

[tasks.named('distZip'),
Expand All @@ -640,9 +643,7 @@ tasks.withType(Test) {
acceptanceTest.dependsOn(rootProject.getTasksByName("publishToMavenLocal", true))
installDist.dependsOn ':extensions:geode-modules-assembly:dist'
distributedTest.dependsOn ':extensions:session-testing-war:war'
distributedTest.dependsOn ':geode-old-versions:build'
upgradeTest.dependsOn ':extensions:session-testing-war:war'
upgradeTest.dependsOn ':geode-old-versions:build'

/**Print the names of all jar files in a fileTree */
def printJars(tree) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.apache.geode.test.junit.rules.gfsh.GfshScript;

@Category(GfshTest.class)
public class ConnectCommandAcceptanceTest {
public class ConnectCommandUpgradeTest {

@Rule
public GfshRule gfsh130 = new GfshRule("1.3.0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.apache.geode.test.version.VersionManager;

@Category(GfshTest.class)
public class GfshRuleIntegrationTest {
public class GfshRuleUpgradeTest {

private static final String GEODE_HOME = System.getenv("GEODE_HOME");
private static final String GFSH_OLD_VERSION = "1.3.0";
Expand Down
4 changes: 1 addition & 3 deletions geode-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ dependencies {
integrationTestImplementation('pl.pragmatists:JUnitParams')
integrationTestImplementation('com.tngtech.archunit:archunit-junit4')

integrationTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))

integrationTestRuntimeOnly('org.apache.derby:derby')
integrationTestRuntimeOnly('xerces:xercesImpl')
Expand All @@ -379,15 +378,14 @@ dependencies {
distributedTestImplementation('com.jayway.jsonpath:json-path-assert')
distributedTestImplementation('net.openhft:compiler')

distributedTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
distributedTestRuntimeOnly('org.apache.derby:derby')


upgradeTestImplementation(project(':geode-dunit')) {
exclude module: 'geode-core'
}

upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))
upgradeTestRuntimeOnly(project(':geode-log4j'))


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.geode.test.junit.categories.BackwardCompatibilityTest;

@Category(BackwardCompatibilityTest.class)
public class VersionManagerIntegrationTest {
public class VersionManagerUpgradeTest {

@Test
public void exceptionIsNotThrownInInitialization() {
Expand Down
2 changes: 1 addition & 1 deletion geode-cq/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies {
upgradeTestImplementation('org.awaitility:awaitility')
upgradeTestImplementation('org.mockito:mockito-core')

upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))
}

ext.moduleName = group + '.cq'
Expand Down
2 changes: 1 addition & 1 deletion geode-dunit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies {
exclude module: 'hamcrest'
}

distributedTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))
}

distributedTest {
Expand Down
2 changes: 1 addition & 1 deletion geode-gfsh/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ dependencies {
upgradeTestImplementation('org.assertj:assertj-core')
upgradeTestImplementation('junit:junit')
upgradeTestImplementation('xml-apis:xml-apis:2.0.2')
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))

implementation('net.sf.jopt-simple:jopt-simple')

Expand Down
1 change: 0 additions & 1 deletion geode-junit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ dependencies {

testImplementation('pl.pragmatists:JUnitParams')

testRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
}

test {
Expand Down
4 changes: 1 addition & 3 deletions geode-logging/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ dependencies {
testImplementation('junit:junit')
testImplementation('org.assertj:assertj-core')

testRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))

integrationTestImplementation(project(':geode-junit')) {
exclude module: 'geode-logging'
Expand All @@ -53,8 +52,7 @@ dependencies {
exclude module: 'geode-logging'
}
distributedTestImplementation('pl.pragmatists:JUnitParams')
distributedTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))

testImplementation('com.tngtech.archunit:archunit-junit4')

Expand Down
2 changes: 1 addition & 1 deletion geode-lucene/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ dependencies {

upgradeTestImplementation(project(':geode-dunit'))
upgradeTestImplementation('commons-io:commons-io')
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))


performanceTestImplementation(project(':geode-junit'))
Expand Down
4 changes: 1 addition & 3 deletions geode-membership/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ dependencies {
testImplementation('org.assertj:assertj-core')
testImplementation('com.tngtech.archunit:archunit-junit4')

testRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))


integrationTestImplementation(project(':geode-junit'))
Expand All @@ -62,10 +61,9 @@ dependencies {
distributedTestImplementation(project(':geode-dunit'))
distributedTestImplementation('pl.pragmatists:JUnitParams')

distributedTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))


upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))
}

distributedTest {
Expand Down
19 changes: 17 additions & 2 deletions geode-old-versions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,27 @@ tasks.named('clean') {
project.createGeodeClasspathsFile.mustRunAfter(clean)
project.createGeodeClasspathsFile.inputs.files(getTasksByName('downloadAndUnzipFile', true))
project.createGeodeClasspathsFile.inputs.files(getTasksByName('enumerateArchiveContents', true))
project.jarTest.dependsOn(createGeodeClasspathsFile)
tasks.named('build') {
dependsOn(tasks.named('createGeodeClasspathsFile'))
}

configurations {
oldVersions
classpathsOutput {
description 'previous geode releases, and their classpath(s)'
}
}

sourceSets {
test {
oldVersions {
output.dir(generatedResources, builtBy: createGeodeClasspathsFile)
}
}
tasks.register('geodeOldVersionClasspathsJar', Jar) {
from sourceSets.oldVersions.output
classifier 'oldVersions'
}

artifacts {
classpathsOutput tasks.named('geodeOldVersionClasspathsJar')
}
4 changes: 1 addition & 3 deletions geode-serialization/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ dependencies {
testImplementation('junit:junit')
testImplementation('org.assertj:assertj-core')

testRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))

integrationTestImplementation(project(':geode-junit')) {
exclude module: 'geode-serialization'
Expand All @@ -59,8 +58,7 @@ dependencies {
exclude module: 'geode-serialization'
}
distributedTestImplementation('pl.pragmatists:JUnitParams')
distributedTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))
}

distributedTest {
Expand Down
11 changes: 6 additions & 5 deletions geode-tcp-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ dependencies {
integrationTestImplementation('org.mockito:mockito-core')
integrationTestImplementation(project(':geode-junit'))

distributedTestImplementation(project(':geode-gfsh'))
distributedTestImplementation(project(':geode-dunit'))
distributedTestImplementation(project(':geode-membership'))
distributedTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
}
upgradeTestImplementation(project(':geode-gfsh'))
upgradeTestImplementation(project(':geode-dunit'))
upgradeTestImplementation(project(':geode-membership'))

upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))
}
2 changes: 1 addition & 1 deletion geode-wan/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ dependencies {
upgradeTestImplementation('junit:junit')
upgradeTestImplementation('xml-apis:xml-apis:2.0.2')

upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'testOutput'))
upgradeTestRuntimeOnly(project(path: ':geode-old-versions', configuration: 'classpathsOutput'))
}

0 comments on commit 3515100

Please sign in to comment.