INT-2280
polishing Jdbc tests hoping to avoid intermittent failures
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
<bean id="storeQueue" class="org.springframework.integration.store.MessageGroupQueue">
|
||||
<constructor-arg ref="messageStore" />
|
||||
<constructor-arg value="input-queue" />
|
||||
<constructor-arg value="JdbcMessageStoreChannelIntegrationTests" />
|
||||
<property name="storeLock" ref="lock" />
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<bean id="queue" class="org.springframework.integration.store.MessageGroupQueue">
|
||||
<constructor-arg ref="messageStore" />
|
||||
<constructor-arg value="input-queue" />
|
||||
<constructor-arg value="JdbcMessageStoreChannelTests" />
|
||||
</bean>
|
||||
|
||||
<service-activator id="service-activator" input-channel="input" output-channel="output" xmlns="http://www.springframework.org/schema/integration">
|
||||
|
||||
@@ -58,7 +58,7 @@ public class JdbcMessageStoreChannelTests {
|
||||
input.send(new GenericMessage<String>("foo"));
|
||||
Service.await(10000);
|
||||
assertEquals(1, Service.messages.size());
|
||||
assertEquals(0, messageStore.getMessageGroup("input-queue").size());
|
||||
assertEquals(0, messageStore.getMessageGroup("JdbcMessageStoreChannelTests").size());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -69,7 +69,7 @@ public class JdbcMessageStoreChannelTests {
|
||||
Service.await(10000);
|
||||
assertEquals(1, Service.messages.size());
|
||||
// After a rollback in the poller the message is still waiting to be delivered
|
||||
assertEquals(1, messageStore.getMessageGroup("input-queue").size());
|
||||
assertEquals(1, messageStore.getMessageGroup("JdbcMessageStoreChannelTests").size());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -87,7 +87,7 @@ public class JdbcMessageStoreChannelTests {
|
||||
// So no activation
|
||||
assertEquals(0, Service.messages.size());
|
||||
// But inside the transaction the message is still there
|
||||
assertEquals(1, messageStore.getMessageGroup("input-queue").size());
|
||||
assertEquals(1, messageStore.getMessageGroup("JdbcMessageStoreChannelTests").size());
|
||||
}
|
||||
|
||||
public static class Service {
|
||||
|
||||
Reference in New Issue
Block a user