INT-3158: Mark Delayer Int. tests as long-running

JIRA: https://jira.springsource.org/browse/INT-3158
This commit is contained in:
Artem Bilan
2013-10-01 22:57:51 +03:00
parent dd5c9cc18c
commit 28131aab32
8 changed files with 33 additions and 15 deletions

View File

@@ -16,7 +16,7 @@
<delayer id="#{T (org.springframework.integration.gemfire.store.DelayerHandlerRescheduleIntegrationTests).DELAYER_ID}"
input-channel="input"
output-channel="output"
default-delay="500"
default-delay="10000"
message-store="messageStore"/>
</beans:beans>

View File

@@ -23,10 +23,9 @@ import java.util.concurrent.TimeUnit;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import com.gemstone.gemfire.cache.Cache;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.data.gemfire.CacheFactoryBean;
@@ -38,9 +37,12 @@ import org.springframework.integration.handler.DelayHandler;
import org.springframework.integration.store.MessageGroup;
import org.springframework.integration.store.MessageGroupStore;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.test.support.LongRunningIntegrationTest;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.util.Assert;
import com.gemstone.gemfire.cache.Cache;
/**
* @author Artem Bilan
@@ -52,6 +54,9 @@ public class DelayerHandlerRescheduleIntegrationTests {
public static Cache cache;
@Rule
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
@BeforeClass
public static void startUp() throws Exception {
CacheFactoryBean cacheFactoryBean = new CacheFactoryBean();
@@ -109,12 +114,12 @@ public class DelayerHandlerRescheduleIntegrationTests {
PollableChannel output = context.getBean("output", PollableChannel.class);
Message<?> message = output.receive(10000);
Message<?> message = output.receive(20000);
assertNotNull(message);
Object payload1 = message.getPayload();
message = output.receive(10000);
message = output.receive(20000);
assertNotNull(message);
Object payload2 = message.getPayload();
assertNotSame(payload1, payload2);

View File

@@ -20,7 +20,7 @@
<delayer id="#{T (org.springframework.integration.jdbc.DelayerHandlerRescheduleIntegrationTests).DELAYER_ID}"
input-channel="input"
output-channel="output"
default-delay="500"
default-delay="10000"
message-store="messageStore"/>
<channel id="transactionalDelayerOutput"/>

View File

@@ -24,6 +24,7 @@ import java.util.concurrent.TimeUnit;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.springframework.context.support.AbstractApplicationContext;
@@ -38,6 +39,7 @@ import org.springframework.integration.handler.DelayHandler;
import org.springframework.integration.store.MessageGroup;
import org.springframework.integration.store.MessageGroupStore;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.test.support.LongRunningIntegrationTest;
import org.springframework.integration.util.UUIDConverter;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
@@ -57,6 +59,9 @@ public class DelayerHandlerRescheduleIntegrationTests {
public static EmbeddedDatabase dataSource;
@Rule
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
@BeforeClass
public static void init() {
dataSource = new EmbeddedDatabaseBuilder()
@@ -115,12 +120,12 @@ public class DelayerHandlerRescheduleIntegrationTests {
PollableChannel output = context.getBean("output", PollableChannel.class);
Message<?> message = output.receive(10000);
Message<?> message = output.receive(20000);
assertNotNull(message);
Object payload1 = message.getPayload();
message = output.receive(10000);
message = output.receive(20000);
assertNotNull(message);
Object payload2 = message.getPayload();
assertNotSame(payload1, payload2);

View File

@@ -23,7 +23,7 @@
<delayer id="#{T (org.springframework.integration.mongodb.store.DelayerHandlerRescheduleIntegrationTests).DELAYER_ID}"
input-channel="input"
output-channel="output"
default-delay="500"
default-delay="10000"
message-store="messageStore"/>
</beans:beans>

View File

@@ -23,6 +23,7 @@ import static org.junit.Assert.fail;
import java.util.Iterator;
import java.util.concurrent.TimeUnit;
import org.junit.Rule;
import org.junit.Test;
import org.hamcrest.Matchers;
@@ -39,6 +40,7 @@ import org.springframework.integration.mongodb.rules.MongoDbAvailableTests;
import org.springframework.integration.store.MessageGroup;
import org.springframework.integration.store.MessageGroupStore;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.test.support.LongRunningIntegrationTest;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
/**
@@ -49,6 +51,9 @@ public class DelayerHandlerRescheduleIntegrationTests extends MongoDbAvailableTe
public static final String DELAYER_ID = "delayerWithMongoMS";
@Rule
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
@Test
@MongoDbAvailable
@SuppressWarnings("unchecked")
@@ -101,12 +106,12 @@ public class DelayerHandlerRescheduleIntegrationTests extends MongoDbAvailableTe
PollableChannel output = context.getBean("output", PollableChannel.class);
Message<?> message = output.receive(10000);
Message<?> message = output.receive(20000);
assertNotNull(message);
Object payload1 = message.getPayload();
message = output.receive(10000);
message = output.receive(20000);
assertNotNull(message);
Object payload2 = message.getPayload();
assertNotSame(payload1, payload2);

View File

@@ -20,7 +20,7 @@
<delayer id="#{T (org.springframework.integration.redis.store.DelayerHandlerRescheduleIntegrationTests).DELAYER_ID}"
input-channel="input"
output-channel="output"
default-delay="500"
default-delay="10000"
message-store="messageStore"/>
</beans:beans>

View File

@@ -21,6 +21,7 @@ import static org.junit.Assert.fail;
import java.util.concurrent.TimeUnit;
import org.junit.Rule;
import org.junit.Test;
import org.springframework.context.support.AbstractApplicationContext;
@@ -35,6 +36,7 @@ import org.springframework.integration.redis.rules.RedisAvailableTests;
import org.springframework.integration.store.MessageGroup;
import org.springframework.integration.store.MessageGroupStore;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.test.support.LongRunningIntegrationTest;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
/**
@@ -45,7 +47,8 @@ public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTest
public static final String DELAYER_ID = "delayerWithRedisMS";
@Rule
public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest();
@Test
@RedisAvailable
@@ -95,12 +98,12 @@ public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTest
PollableChannel output = context.getBean("output", PollableChannel.class);
Message<?> message = output.receive(10000);
Message<?> message = output.receive(20000);
assertNotNull(message);
Object payload1 = message.getPayload();
message = output.receive(10000);
message = output.receive(20000);
assertNotNull(message);
Object payload2 = message.getPayload();
assertNotSame(payload1, payload2);