INT-3152 Speed Up Build Times
Add a `@Rule` to skip long-runing tests during normal builds. Add the rule to long-running tests in gemfire, ip, jms, jmx. Add an environment variable `RUN_LONG_INTEGRATION_TESTS`; when set to true, all tests are run. Set the environment variable to true on all nightly builds. Build now runs in 13 minutes on my 3 year old laptop. Polishing - Switch to TestWatcher TestWatchMan is deprecated. INT-3152 Polishing Show Skipped Tests as 'Ignored' In test report. JIRA: https://jira.springsource.org/browse/INT-3152
This commit is contained in:
committed by
Artem Bilan
parent
b81e9255d2
commit
bddbc5b6fb
@@ -23,12 +23,14 @@ import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.Executors;
|
||||
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;
|
||||
import org.springframework.integration.jms.config.ActiveMqTestUtils;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.test.support.LongRunningIntegrationTest;
|
||||
/**
|
||||
* @author Oleg Zhurakousky
|
||||
*/
|
||||
@@ -36,6 +38,15 @@ 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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,12 +24,14 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
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;
|
||||
import org.springframework.integration.jms.config.ActiveMqTestUtils;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.test.support.LongRunningIntegrationTest;
|
||||
/**
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Gary Russell
|
||||
@@ -39,6 +41,15 @@ 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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,13 +28,16 @@ import javax.jms.MessageProducer;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TextMessage;
|
||||
|
||||
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;
|
||||
import org.springframework.integration.jms.JmsOutboundGateway;
|
||||
import org.springframework.integration.jms.config.ActiveMqTestUtils;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.test.support.LongRunningIntegrationTest;
|
||||
import org.springframework.integration.test.util.TestUtils;
|
||||
import org.springframework.jms.connection.CachingConnectionFactory;
|
||||
import org.springframework.jms.core.JmsTemplate;
|
||||
@@ -49,6 +52,9 @@ public class RequestReplyScenariosWithCachedConsumersTests {
|
||||
|
||||
private final SimpleMessageConverter converter = new SimpleMessageConverter();
|
||||
|
||||
@Rule
|
||||
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
|
||||
|
||||
@Test(expected=MessageTimeoutException.class)
|
||||
public void messageCorrelationBasedOnRequestMessageIdOptimized() throws Exception{
|
||||
ActiveMqTestUtils.prepare();
|
||||
|
||||
@@ -17,6 +17,7 @@ package org.springframework.integration.jms.request_reply;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
@@ -24,12 +25,16 @@ import org.springframework.integration.gateway.RequestReplyExchanger;
|
||||
import org.springframework.integration.jms.JmsOutboundGateway;
|
||||
import org.springframework.integration.jms.config.ActiveMqTestUtils;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
import org.springframework.integration.test.support.LongRunningIntegrationTest;
|
||||
import org.springframework.integration.test.util.TestUtils;
|
||||
/**
|
||||
* @author Oleg Zhurakousky
|
||||
*/
|
||||
public class RequestReplyScenariosWithCorrelationKeyProvidedTests {
|
||||
|
||||
@Rule
|
||||
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
|
||||
|
||||
@Test
|
||||
public void messageCorrelationBasedCustomCorrelationKey() throws Exception{
|
||||
ActiveMqTestUtils.prepare();
|
||||
|
||||
@@ -24,13 +24,16 @@ import javax.jms.Message;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TextMessage;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.AbstractApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.MessageTimeoutException;
|
||||
import org.springframework.integration.gateway.RequestReplyExchanger;
|
||||
import org.springframework.integration.jms.config.ActiveMqTestUtils;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.test.support.LongRunningIntegrationTest;
|
||||
import org.springframework.jms.core.JmsTemplate;
|
||||
import org.springframework.jms.core.MessageCreator;
|
||||
/**
|
||||
@@ -38,6 +41,9 @@ import org.springframework.jms.core.MessageCreator;
|
||||
*/
|
||||
public class RequestReplyScenariosWithNonCachedConsumersTests {
|
||||
|
||||
@Rule
|
||||
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
|
||||
|
||||
@Test(expected=MessageTimeoutException.class)
|
||||
public void messageCorrelationBasedOnRequestMessageIdOptimized() throws Exception{
|
||||
ActiveMqTestUtils.prepare();
|
||||
|
||||
@@ -36,6 +36,7 @@ import javax.jms.TextMessage;
|
||||
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
import org.apache.activemq.command.ActiveMQDestination;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
@@ -43,6 +44,7 @@ import org.springframework.integration.MessageDeliveryException;
|
||||
import org.springframework.integration.gateway.RequestReplyExchanger;
|
||||
import org.springframework.integration.jms.config.ActiveMqTestUtils;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.test.support.LongRunningIntegrationTest;
|
||||
import org.springframework.integration.test.util.TestUtils;
|
||||
import org.springframework.jms.connection.CachingConnectionFactory;
|
||||
import org.springframework.jms.core.JmsTemplate;
|
||||
@@ -57,6 +59,9 @@ public class RequestReplyScenariosWithTempReplyQueuesTests {
|
||||
|
||||
private final SimpleMessageConverter converter = new SimpleMessageConverter();
|
||||
|
||||
@Rule
|
||||
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
|
||||
|
||||
@Test
|
||||
public void messageCorrelationBasedOnRequestMessageId() throws Exception{
|
||||
ActiveMqTestUtils.prepare();
|
||||
|
||||
Reference in New Issue
Block a user