Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Integration test now working again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Lautenschlager committed Jan 16, 2018
1 parent 1e4bd13 commit b318c17
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 44 deletions.
45 changes: 45 additions & 0 deletions chronix-server-bin/build.gradle
Expand Up @@ -8,6 +8,18 @@ buildscript {
}

apply plugin: 'de.undercouch.download'

sourceSets {
intTest {
groovy.srcDir 'src/inttest/groovy'
resources.srcDir 'src/inttest/resources'
}
}
configurations {
intTestCompile.extendsFrom(testCompile)
intTestRuntime.extendsFrom(testRuntime)
}

dependencies {
testCompile project(':chronix-server-query-handler')
testCompile project(':chronix-server-ingestion-handler')
Expand Down Expand Up @@ -222,3 +234,36 @@ task buildRelease(dependsOn: deleteUnusedDirs, type: Zip) {
}


task intTest(type: Test) {
//group = LifecycleBasePlugin.VERIFICATION_GROUP
description = 'Runs the integration tests.'

maxHeapSize = '512m'

testClassesDirs = sourceSets.intTest.output.classesDirs
classpath = sourceSets.intTest.runtimeClasspath

binResultsDir = file("$buildDir/integration-test-results/binary/inttest")

reports {
html.setDestination("$buildDir/reports/integration-test" as File)
junitXml.setDestination("$buildDir/integration-test-results" as File)
}
}

gradle.projectsEvaluated {
def quickTasks = []

gradle.rootProject.allprojects.each { project ->
quickTasks.addAll(project.tasks.findAll { it.name == 'test' })
quickTasks.addAll(project.tasks.withType(FindBugs))
quickTasks.addAll(project.tasks.withType(Pmd))
}

quickTasks.each { task ->
project.tasks.intTest.mustRunAfter task
}
}
intTest.dependsOn startSolr

intTest.finalizedBy stopSolr
46 changes: 2 additions & 44 deletions chronix-server-test-integration/build.gradle
Expand Up @@ -4,12 +4,7 @@ sonarqube {
}
}

sourceSets {
test {
groovy.srcDir 'src/inttest/groovy'
resources.srcDir 'src/inttest/resources'
}
}
apply from: "$rootDir/chronix-server-bin/build.gradle"

dependencies {
compile 'org.apache.commons:commons-lang3:3.1'
Expand Down Expand Up @@ -127,41 +122,4 @@ bintray {
}
}
}
}

apply from: "$rootDir/chronix-server-bin/build.gradle"


task intTest(type: Test) {
//group = LifecycleBasePlugin.VERIFICATION_GROUP
description = 'Runs the integration tests.'

maxHeapSize = '512m'

testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath

binResultsDir = file("$buildDir/integration-test-results/binary/inttest")

reports {
html.setDestination("$buildDir/reports/integration-test" as File)
junitXml.setDestination("$buildDir/integration-test-results" as File)
}
}

gradle.projectsEvaluated {
def quickTasks = []

gradle.rootProject.allprojects.each { project ->
quickTasks.addAll(project.tasks.findAll { it.name == 'test' })
quickTasks.addAll(project.tasks.withType(FindBugs))
quickTasks.addAll(project.tasks.withType(Pmd))
}

quickTasks.each { task ->
project.tasks.intTest.mustRunAfter task
}
}
intTest.dependsOn startSolr

intTest.finalizedBy stopSolr
}

0 comments on commit b318c17

Please sign in to comment.