AMQP-343: Upgrade Gradle and testAll task
JIRA: https://jira.springsource.org/browse/AMQP-343
This commit is contained in:
committed by
Gary Russell
parent
95f30fc504
commit
29afd42d2b
@@ -113,6 +113,13 @@ subprojects { subproject ->
|
||||
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*"
|
||||
}
|
||||
|
||||
task testAll() {
|
||||
doFirst {
|
||||
tasks.test.systemProperty 'RUN_LONG_INTEGRATION_TESTS', 'true'
|
||||
}
|
||||
finalizedBy test
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allJava
|
||||
@@ -374,5 +381,5 @@ task dist(dependsOn: assemble) {
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
description = 'Generates gradlew[.bat] scripts'
|
||||
gradleVersion = '1.6'
|
||||
gradleVersion = '1.9'
|
||||
}
|
||||
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Wed May 29 12:32:44 EDT 2013
|
||||
#Tue Dec 10 18:11:16 EET 2013
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-bin.zip
|
||||
|
||||
@@ -27,20 +27,33 @@ import org.junit.runners.model.Statement;
|
||||
* variable RUN_LONG_INTEGRATION_TESTS on a CI nightly build to ensure coverage.
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @since 3.0
|
||||
* @author Artem Bilan
|
||||
* @since 1.2.1
|
||||
*
|
||||
*/
|
||||
public class LongRunningIntegrationTest extends TestWatchman {
|
||||
|
||||
private final static Log logger = LogFactory.getLog(LongRunningIntegrationTest.class);
|
||||
|
||||
private static final String RUN_LONG_PROP = "RUN_LONG_INTEGRATION_TESTS";
|
||||
|
||||
private boolean shouldRun = false;
|
||||
|
||||
public LongRunningIntegrationTest() {
|
||||
for(String value: new String[]{System.getenv(RUN_LONG_PROP), System.getProperty(RUN_LONG_PROP)}) {
|
||||
if ("true".equalsIgnoreCase(value)) {
|
||||
this.shouldRun = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Statement apply(Statement base, FrameworkMethod method, Object target) {
|
||||
boolean shouldRun = "true".equalsIgnoreCase(System.getenv("RUN_LONG_INTEGRATION_TESTS"));
|
||||
if (!shouldRun) {
|
||||
logger.info("Skipping long running test " + this.getClass().getSimpleName() + "." + method.getName());
|
||||
if (!this.shouldRun) {
|
||||
logger.info("Skipping long running test " + target.getClass().getSimpleName() + "#" + method.getName());
|
||||
}
|
||||
Assume.assumeTrue(shouldRun);
|
||||
Assume.assumeTrue(this.shouldRun);
|
||||
return super.apply(base, method, target);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user