Fix FTP sample tests to use bigger idle

https://build.spring.io/browse/INTSAMPLES-NIGHTLY-2059/

Fix `JmsMockTests` stubbing via making endpoint stopped before mocking

Force SI and SF versions via their BOMs imports
Regenerate POMs including `dependencyManagement` for BOMs customization
This commit is contained in:
Artem Bilan
2017-04-10 13:53:06 -04:00
parent 2b80cf25a8
commit 5956cf8cfb
72 changed files with 1771 additions and 447 deletions

View File

@@ -9,13 +9,13 @@
<!-- This is a test context that injects a Mock JMS template into a JMS
inbound channel adapter. The inbound-channel-adapter provides or overrides
the 'real' adapter for testing purposes. If the flow imported flow throws
an exception, an ErrorMessage containg the exception will be sent to the
the 'real' adapter for testing purposes. If the flow imported throws
an exception, an ErrorMessage containing the exception will be sent to the
error channel for additional handling. -->
<import resource="classpath:integration-config.xml" />
<int-jms:inbound-channel-adapter jms-template="jmsTemplate" channel="inputChannel">
<int-jms:inbound-channel-adapter id="jmsInboundChannelAdapter" jms-template="jmsTemplate" channel="inputChannel">
<int:poller fixed-rate="500" max-messages-per-poll="1" error-channel="errorChannel" />
</int-jms:inbound-channel-adapter>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.support.converter.SimpleMessageConverter;
import org.springframework.messaging.Message;
@@ -62,19 +63,22 @@ public class JmsMockTests {
private static final Logger LOGGER = Logger.getLogger(JmsMockTests.class);
@Autowired
JmsTemplate mockJmsTemplate;
private JmsTemplate mockJmsTemplate;
@Autowired
private SourcePollingChannelAdapter jmsInboundChannelAdapter;
@Autowired
@Qualifier("inputChannel")
MessageChannel inputChannel;
private MessageChannel inputChannel;
@Autowired
@Qualifier("outputChannel")
SubscribableChannel outputChannel;
private SubscribableChannel outputChannel;
@Autowired
@Qualifier("invalidMessageChannel")
SubscribableChannel invalidMessageChannel;
private SubscribableChannel invalidMessageChannel;
/**
* This test verifies that a message received on a polling JMS inbound channel adapter is
@@ -110,7 +114,7 @@ public class JmsMockTests {
@Test
public void testReceiveInvalidMessage() throws JMSException, IOException, InterruptedException {
String msg = "whoops";
boolean sent = verifyJmsMessageReceivedOnOutputChannel(msg, invalidMessageChannel,new CountDownHandler() {
boolean sent = verifyJmsMessageReceivedOnOutputChannel(msg, invalidMessageChannel, new CountDownHandler() {
@Override
protected void verifyMessage(Message<?> message) {
@@ -177,6 +181,8 @@ public class JmsMockTests {
expectedOutputChannel.subscribe(handler);
this.jmsInboundChannelAdapter.start();
boolean latchCountedToZero = latch.await(timeoutMillisec, TimeUnit.MILLISECONDS);
if (!latchCountedToZero) {