diff --git a/build.gradle b/build.gradle index 55e58b37..a23209fc 100644 --- a/build.gradle +++ b/build.gradle @@ -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' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0625f60f..17e4aa9b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/LongRunningIntegrationTest.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/LongRunningIntegrationTest.java index bc70e863..de5d893f 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/LongRunningIntegrationTest.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/test/LongRunningIntegrationTest.java @@ -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); }