INT-3589: Upgrade Dependencies
JIRA: https://jira.spring.io/browse/INT-3589, https://jira.spring.io/browse/INT-3624 * SF - 4.2. Fix Breaking changes for the `ApplicationEventPublisher` * AMQP 1.5. Without issues * Reactor - 2.0. Fix for the new `Stream` foundation * jsonPath - 1.2.0. Fix for new `Predicate` abstraction. Add 'fail-fast error' to the `IntegrationRegistrar` * Sshd - 0.13.0. Fix for new `VirtualFileSystemFactory` usage * Spring Data - Fowler * And others without issues * Get rid of `reactor.util.StringUtils` usage INT-3589: Address PR comments Polishing
This commit is contained in:
committed by
Gary Russell
parent
b07686cdc0
commit
f248394682
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2015 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.ip.tcp;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
@@ -32,6 +33,12 @@ public class AbstractTcpChannelAdapterTests {
|
||||
@Override
|
||||
public void publishEvent(ApplicationEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
protected HelloWorldInterceptorFactory newInterceptorFactory() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.ip.tcp.connection;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -355,6 +356,12 @@ public class CachingClientConnectionFactoryTests {
|
||||
@Override
|
||||
public void publishEvent(ApplicationEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
}, "foo");
|
||||
conn.setMapper(new TcpMessageMapper());
|
||||
conn.setSerializer(new ByteArrayCrLfSerializer());
|
||||
@@ -371,6 +378,12 @@ public class CachingClientConnectionFactoryTests {
|
||||
@Override
|
||||
public void publishEvent(ApplicationEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
}, "foo");
|
||||
conn.setMapper(new TcpMessageMapper());
|
||||
conn.setSerializer(new ByteArrayCrLfSerializer());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.ip.tcp.connection;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
@@ -48,9 +49,16 @@ public class ConnectionEventTests {
|
||||
final List<TcpConnectionEvent> theEvent = new ArrayList<TcpConnectionEvent>();
|
||||
TcpNetConnection conn = new TcpNetConnection(socket, false, false, new ApplicationEventPublisher() {
|
||||
|
||||
@Override
|
||||
public void publishEvent(ApplicationEvent event) {
|
||||
theEvent.add((TcpConnectionEvent) event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
}, "foo");
|
||||
/*
|
||||
* Open is not published by the connection itself; the factory publishes it after initialization.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.ip.tcp.connection;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -53,9 +54,17 @@ public class ConnectionFactoryTests {
|
||||
final List<TcpConnectionEvent> events =
|
||||
Collections.synchronizedList(new ArrayList<TcpConnectionEvent>());
|
||||
ApplicationEventPublisher publisher = new ApplicationEventPublisher() {
|
||||
|
||||
@Override
|
||||
public void publishEvent(ApplicationEvent event) {
|
||||
events.add((TcpConnectionEvent) event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
int port = SocketUtils.findAvailableServerSocket();
|
||||
TcpNetServerConnectionFactory serverFactory = new TcpNetServerConnectionFactory(port);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -269,12 +269,19 @@ public class ConnectionTimeoutTests {
|
||||
final CountDownLatch clientClosedLatch;
|
||||
clientClosedLatch = new CountDownLatch(1);
|
||||
client.setApplicationEventPublisher(new ApplicationEventPublisher() {
|
||||
|
||||
@Override
|
||||
public void publishEvent(ApplicationEvent event) {
|
||||
if (event instanceof TcpConnectionCloseEvent) {
|
||||
clientClosedLatch.countDown();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
return clientClosedLatch;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.ip.tcp.connection;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
@@ -309,6 +310,12 @@ public class FailoverClientConnectionFactoryTests {
|
||||
@Override
|
||||
public void publishEvent(ApplicationEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
client1.setApplicationEventPublisher(pub);
|
||||
client2.setApplicationEventPublisher(pub);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.ip.tcp.connection;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -55,8 +56,16 @@ import org.springframework.messaging.support.ErrorMessage;
|
||||
public class TcpNetConnectionTests {
|
||||
|
||||
private final ApplicationEventPublisher nullPublisher = new ApplicationEventPublisher() {
|
||||
|
||||
@Override
|
||||
public void publishEvent(ApplicationEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@Test
|
||||
@@ -93,7 +102,8 @@ public class TcpNetConnectionTests {
|
||||
Socket socket = mock(Socket.class);
|
||||
when(socketChannel.socket()).thenReturn(socket);
|
||||
TcpNioConnection connection = new TcpNioConnection(socketChannel, true, false, nullPublisher, null);
|
||||
ChannelInputStream inputStream = TestUtils.getPropertyValue(connection, "channelInputStream", ChannelInputStream.class);
|
||||
ChannelInputStream inputStream =
|
||||
TestUtils.getPropertyValue(connection, "channelInputStream", ChannelInputStream.class);
|
||||
inputStream.write(new byte[] {(byte) 0x80}, 1);
|
||||
assertEquals(0x80, inputStream.read());
|
||||
}
|
||||
@@ -145,4 +155,5 @@ public class TcpNetConnectionTests {
|
||||
assertEquals("foo", inboundMessage.get().getPayload());
|
||||
assertEquals("baz", inboundMessage.get().getHeaders().get("bar"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -98,9 +98,16 @@ import org.springframework.util.ReflectionUtils.FieldFilter;
|
||||
public class TcpNioConnectionTests {
|
||||
|
||||
private final ApplicationEventPublisher nullPublisher = new ApplicationEventPublisher() {
|
||||
|
||||
@Override
|
||||
public void publishEvent(ApplicationEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@Test
|
||||
@@ -713,6 +720,12 @@ public class TcpNioConnectionTests {
|
||||
public void publishEvent(ApplicationEvent event) {
|
||||
connectionLatch.countDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
final CountDownLatch assemblerLatch = new CountDownLatch(1);
|
||||
final AtomicReference<Thread> assembler = new AtomicReference<Thread>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -302,6 +302,12 @@ public class DeserializationTests {
|
||||
public void publishEvent(ApplicationEvent anEvent) {
|
||||
event.set((TcpDeserializationExceptionEvent) anEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Publisher publisher = new Publisher();
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(data);
|
||||
|
||||
Reference in New Issue
Block a user