INT-3152: Backport polishing

JIRA: https://jira.springsource.org/browse/INT-3152
This commit is contained in:
Artem Bilan
2013-09-27 21:09:08 +03:00
parent bddbc5b6fb
commit 6ebcc3d9f2
4 changed files with 11 additions and 18 deletions

View File

@@ -827,11 +827,14 @@ project('spring-integration-test') {
bundleSymbolicName = 'org.springframework.integration.test'
importTemplate += [
'org.apache.tools.ant.*;version="[1.7.0, 2.0.0)"',
'org.apache.commons.logging;version="[1.1.1, 2.0.0)"',
'org.springframework.*;version="[3.0.7, 4.0.0)"',
'org.springframework.integration.*;version="[2.2.6, 2.2.7)"',
'javax.net.*;version="0"',
'junit.framework.*;version="[4.6.0, 4.7.0)"',
'org.junit.*;version="[4.6.0, 4.7.0)"',
'org.junit.rules.*;version="[4.6.0, 4.7.0)"',
'org.junit.runners.model.*;version="[4.6.0, 4.7.0)"',
'org.mockito.*;version="[1.6.0, 2.0.0)"',
'org.hamcrest.*;version="[1.1.0, 1.1.0]"',
'org.objenesis.*;version="[1.0.0, 2.0.0)"'

View File

@@ -25,6 +25,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Rule;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.MessageTimeoutException;
import org.springframework.integration.gateway.RequestReplyExchanger;
@@ -38,15 +39,9 @@ public class PipelineJmsTests {
private final Executor executor = Executors.newFixedThreadPool(30);
private static final Log logger = LogFactory.getLog(PipelineJmsTests.class);
@Rule
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
@Before
public void setLogLevel() {
LogManager.getLogger(getClass()).setLevel(Level.INFO);
}
int requests = 50;
/**

View File

@@ -26,6 +26,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Rule;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.MessageTimeoutException;
import org.springframework.integration.gateway.RequestReplyExchanger;
@@ -41,15 +42,9 @@ public class PipelineNamedReplyQueuesJmsTests {
private final Executor executor = Executors.newFixedThreadPool(30);
private static final Log logger = LogFactory.getLog(PipelineJmsTests.class);
@Rule
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
@Before
public void setLogLevel() {
LogManager.getLogger(getClass()).setLevel(Level.INFO);
}
int requests = 50;
/**

View File

@@ -18,8 +18,8 @@ package org.springframework.integration.test.support;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Assume;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;
import org.junit.rules.TestWatchman;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;
/**
@@ -30,15 +30,15 @@ import org.junit.runners.model.Statement;
* @since 3.0
*
*/
public class LongRunningIntegrationTest extends TestWatcher {
public class LongRunningIntegrationTest extends TestWatchman {
private final static Log logger = LogFactory.getLog(LongRunningIntegrationTest.class);
@Override
public Statement apply(Statement base, Description description) {
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 " + description.getDisplayName());
logger.info("Skipping long running test " + this.getClass().getSimpleName() + "." + method.getName());
return new Statement() {
@Override
@@ -48,7 +48,7 @@ public class LongRunningIntegrationTest extends TestWatcher {
};
}
else {
return super.apply(base, description);
return super.apply(base, method, target);
}
}