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.
This commit is contained in:
@@ -28,6 +28,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
@@ -36,6 +37,7 @@ import org.springframework.integration.gateway.RequestReplyExchanger;
|
||||
import org.springframework.integration.jms.ActiveMQMultiContextTests;
|
||||
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
|
||||
@@ -47,6 +49,9 @@ public class PipelineJmsTests extends ActiveMQMultiContextTests {
|
||||
|
||||
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);
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
@@ -37,6 +38,7 @@ import org.springframework.integration.gateway.RequestReplyExchanger;
|
||||
import org.springframework.integration.jms.ActiveMQMultiContextTests;
|
||||
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
|
||||
@@ -49,6 +51,9 @@ public class PipelineNamedReplyQueuesJmsTests extends ActiveMQMultiContextTests
|
||||
|
||||
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);
|
||||
|
||||
@@ -28,7 +28,9 @@ 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;
|
||||
@@ -36,6 +38,7 @@ import org.springframework.integration.jms.ActiveMQMultiContextTests;
|
||||
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;
|
||||
@@ -51,6 +54,9 @@ public class RequestReplyScenariosWithCachedConsumersTests extends ActiveMQMulti
|
||||
|
||||
private final SimpleMessageConverter converter = new SimpleMessageConverter();
|
||||
|
||||
@Rule
|
||||
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
|
||||
|
||||
@Test(expected=MessageTimeoutException.class)
|
||||
public void messageCorrelationBasedOnRequestMessageIdOptimized() throws Exception{
|
||||
ActiveMqTestUtils.prepare();
|
||||
|
||||
@@ -17,13 +17,16 @@ 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;
|
||||
import org.springframework.integration.gateway.RequestReplyExchanger;
|
||||
import org.springframework.integration.jms.ActiveMQMultiContextTests;
|
||||
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
|
||||
@@ -31,6 +34,9 @@ import org.springframework.integration.test.util.TestUtils;
|
||||
*/
|
||||
public class RequestReplyScenariosWithCorrelationKeyProvidedTests extends ActiveMQMultiContextTests {
|
||||
|
||||
@Rule
|
||||
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
|
||||
|
||||
@Test
|
||||
public void messageCorrelationBasedCustomCorrelationKey() throws Exception{
|
||||
ActiveMqTestUtils.prepare();
|
||||
|
||||
@@ -24,7 +24,9 @@ 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;
|
||||
@@ -32,6 +34,7 @@ import org.springframework.integration.gateway.RequestReplyExchanger;
|
||||
import org.springframework.integration.jms.ActiveMQMultiContextTests;
|
||||
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;
|
||||
/**
|
||||
@@ -40,6 +43,9 @@ import org.springframework.jms.core.MessageCreator;
|
||||
*/
|
||||
public class RequestReplyScenariosWithNonCachedConsumersTests extends ActiveMQMultiContextTests {
|
||||
|
||||
@Rule
|
||||
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
|
||||
|
||||
@Test(expected=MessageTimeoutException.class)
|
||||
public void messageCorrelationBasedOnRequestMessageIdOptimized() throws Exception{
|
||||
ActiveMqTestUtils.prepare();
|
||||
|
||||
@@ -36,13 +36,16 @@ 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;
|
||||
import org.springframework.integration.MessageDeliveryException;
|
||||
import org.springframework.integration.gateway.RequestReplyExchanger;
|
||||
import org.springframework.integration.jms.ActiveMQMultiContextTests;
|
||||
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;
|
||||
@@ -58,6 +61,9 @@ public class RequestReplyScenariosWithTempReplyQueuesTests extends ActiveMQMulti
|
||||
|
||||
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