Add EmptyLineSeparator Checkstyle rule
* Support "blank lines around" via `spring-framework.xml` IDEA config * Fix all the Checkstyle violations
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2022 the original author or authors.
|
||||
* Copyright 2014-2024 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.
|
||||
@@ -41,7 +41,6 @@ public class TcpConnectionFactoryFactoryBeanTest {
|
||||
assertThat(TestUtils.getPropertyValue(fb.getObject(), "readDelay")).isEqualTo(100L);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testReadDelay() throws Exception {
|
||||
TcpConnectionFactoryFactoryBean fb = new TcpConnectionFactoryFactoryBean();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2023 the original author or authors.
|
||||
* Copyright 2016-2024 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.
|
||||
@@ -207,16 +207,11 @@ public class IpIntegrationTests {
|
||||
.get();
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
AtomicInteger port = new AtomicInteger();
|
||||
class Listener implements ApplicationListener<TcpConnectionServerListeningEvent> {
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(TcpConnectionServerListeningEvent event) {
|
||||
port.set(event.getPort());
|
||||
latch.countDown();
|
||||
}
|
||||
|
||||
}
|
||||
this.applicationContext.addApplicationListener(new Listener());
|
||||
this.applicationContext.addApplicationListener(
|
||||
(ApplicationListener<TcpConnectionServerListeningEvent>) event -> {
|
||||
port.set(event.getPort());
|
||||
latch.countDown();
|
||||
});
|
||||
this.flowContext.registration(server)
|
||||
.id("streamCloseServer")
|
||||
.register();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -64,4 +64,5 @@ public class AutoStartTests {
|
||||
tcpNetIn.stop();
|
||||
TestingUtilities.waitStopListening(cfS1, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -47,7 +47,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
/**
|
||||
* @author Gary Russell
|
||||
* @author Gunnar Hillert
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -21,7 +21,6 @@ import org.junit.Test;
|
||||
import org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory;
|
||||
import org.springframework.integration.ip.tcp.connection.TcpNetServerConnectionFactory;
|
||||
|
||||
|
||||
/**
|
||||
* @author Gary Russell
|
||||
* @since 2.0.4
|
||||
@@ -42,4 +41,5 @@ public class FactoryStopStartTests {
|
||||
public static void main(String[] args) {
|
||||
new FactoryStopStartTests().testRestart();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -223,7 +223,6 @@ public class TcpConfigOutboundGatewayTests {
|
||||
assertThat(new String(bytes).trim()).isEqualTo("echo:test");
|
||||
}
|
||||
|
||||
|
||||
private void testOutboundUsingConfig() {
|
||||
Message<String> message = MessageBuilder.withPayload("test").build();
|
||||
requestChannel.send(message);
|
||||
|
||||
@@ -345,7 +345,6 @@ public class TcpInboundGatewayTests {
|
||||
client.stop();
|
||||
}
|
||||
|
||||
|
||||
private void readFully(InputStream is, byte[] buff) throws IOException {
|
||||
for (int i = 0; i < buff.length; i++) {
|
||||
buff[i] = (byte) is.read();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -1096,7 +1096,7 @@ public class TcpOutboundGatewayTests {
|
||||
given(connection.getConnectionId()).willReturn("testId");
|
||||
willThrow(new RuntimeException("intentional"))
|
||||
.given(connection)
|
||||
.send(any(Message.class));
|
||||
.send(any(Message.class));
|
||||
|
||||
willReturn(connection)
|
||||
.given(ccf)
|
||||
|
||||
@@ -654,6 +654,7 @@ public class TcpReceivingChannelAdapterTests extends AbstractTcpChannelAdapterTe
|
||||
public String serviceMethod(byte[] bytes) {
|
||||
throw new RuntimeException("Failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -80,7 +80,6 @@ import static org.assertj.core.api.Assertions.fail;
|
||||
import static org.awaitility.Awaitility.await;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
|
||||
/**
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -61,4 +61,5 @@ public class TcpSendingNoSocketTests {
|
||||
public void exceptionTrapped() {
|
||||
advised.send(new GenericMessage<String>("foo"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -227,6 +227,7 @@ public class ConnectionTimeoutTests {
|
||||
return false;
|
||||
});
|
||||
server.registerSender(new TcpSender() {
|
||||
|
||||
@Override
|
||||
public void addNewConnection(TcpConnection connection) {
|
||||
serverConnection.set(connection);
|
||||
@@ -241,6 +242,7 @@ public class ConnectionTimeoutTests {
|
||||
public void setupClientCallback(AbstractClientConnectionFactory client) {
|
||||
client.setComponentName("clientFactory");
|
||||
client.registerSender(new TcpSender() {
|
||||
|
||||
@Override
|
||||
public void addNewConnection(TcpConnection connection) {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -19,7 +19,6 @@ package org.springframework.integration.ip.tcp.connection;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.ApplicationEventPublisherAware;
|
||||
|
||||
|
||||
/**
|
||||
* @author Gary Russell
|
||||
* @since 2.0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -102,7 +102,6 @@ public class TcpNioConnectionReadTests {
|
||||
done.countDown();
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void testFragmented() throws Exception {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -93,7 +93,6 @@ import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
||||
/**
|
||||
* @author Gary Russell
|
||||
* @author John Anderson
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2022-2023 the original author or authors.
|
||||
* Copyright 2022-2024 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.
|
||||
@@ -24,7 +24,6 @@ import java.util.Map;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -33,6 +32,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
/**
|
||||
* @author Gary Russell
|
||||
* @author Kazuki Shimizu
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 5.3.10
|
||||
*
|
||||
*/
|
||||
@@ -83,7 +84,6 @@ public class TcpSenderTests {
|
||||
AtomicInteger instances = new AtomicInteger();
|
||||
List<Integer> addOrder = Collections.synchronizedList(new ArrayList<>());
|
||||
List<Integer> remOrder = Collections.synchronizedList(new ArrayList<>());
|
||||
AtomicReference<Thread> thread = new AtomicReference<>();
|
||||
Map<Integer, TcpConnection> interceptorsPerInstance = new HashMap<>();
|
||||
List<TcpConnection> passedConnectionsToSenderViaAddNewConnection = new ArrayList<>();
|
||||
class InterceptorFactory extends HelloWorldInterceptorFactory {
|
||||
@@ -118,6 +118,7 @@ public class TcpSenderTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
chain.setInterceptor(new InterceptorFactory(), new InterceptorFactory(), new InterceptorFactory());
|
||||
client.setInterceptorFactoryChain(chain);
|
||||
CountDownLatch firstClosed = new CountDownLatch(1);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -24,7 +24,6 @@ import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import javax.net.ServerSocketFactory;
|
||||
@@ -33,8 +32,6 @@ import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.core.serializer.DefaultDeserializer;
|
||||
import org.springframework.core.task.SimpleAsyncTaskExecutor;
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
@@ -57,6 +54,7 @@ import static org.mockito.Mockito.mock;
|
||||
/**
|
||||
* @author Gary Russell
|
||||
* @author Gavin Gray
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
@@ -183,7 +181,6 @@ public class DeserializationTests {
|
||||
}
|
||||
catch (IOException e) {
|
||||
if (!e.getMessage().startsWith("Message length")) {
|
||||
e.printStackTrace();
|
||||
fail("Unexpected IO Error:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -206,7 +203,6 @@ public class DeserializationTests {
|
||||
}
|
||||
catch (IOException e) {
|
||||
if (!e.getMessage().startsWith("Read timed out")) {
|
||||
e.printStackTrace();
|
||||
fail("Unexpected IO Error:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -230,7 +226,6 @@ public class DeserializationTests {
|
||||
}
|
||||
catch (IOException e) {
|
||||
if (!e.getMessage().startsWith("ETX not found")) {
|
||||
e.printStackTrace();
|
||||
fail("Unexpected IO Error:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -253,7 +248,6 @@ public class DeserializationTests {
|
||||
}
|
||||
catch (IOException e) {
|
||||
if (!e.getMessage().startsWith("Read timed out")) {
|
||||
e.printStackTrace();
|
||||
fail("Unexpected IO Error:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -277,7 +271,6 @@ public class DeserializationTests {
|
||||
}
|
||||
catch (IOException e) {
|
||||
if (!e.getMessage().startsWith("CRLF not found")) {
|
||||
e.printStackTrace();
|
||||
fail("Unexpected IO Error:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -289,22 +282,18 @@ public class DeserializationTests {
|
||||
public void canDeserializeMultipleSubsequentTerminators() throws IOException {
|
||||
byte terminator = (byte) '\n';
|
||||
ByteArraySingleTerminatorSerializer serializer = new ByteArraySingleTerminatorSerializer(terminator);
|
||||
ByteArrayInputStream inputStream = new ByteArrayInputStream("s\n\n".getBytes());
|
||||
|
||||
try {
|
||||
try (ByteArrayInputStream inputStream = new ByteArrayInputStream("s\n\n".getBytes())) {
|
||||
byte[] bytes = serializer.deserialize(inputStream);
|
||||
assertThat(bytes.length).isEqualTo(1);
|
||||
assertThat(bytes[0]).isEqualTo("s".getBytes()[0]);
|
||||
bytes = serializer.deserialize(inputStream);
|
||||
assertThat(bytes.length).isEqualTo(0);
|
||||
}
|
||||
finally {
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void deserializationEvents() throws Exception {
|
||||
public void deserializationEvents() {
|
||||
doDeserialize(new ByteArrayCrLfSerializer(), "CRLF not found before max message length: 5");
|
||||
doDeserialize(new ByteArrayLengthHeaderSerializer(), "Message length 1718579042 exceeds max message length: 5");
|
||||
TcpDeserializationExceptionEvent event = doDeserialize(new ByteArrayLengthHeaderSerializer(),
|
||||
@@ -330,24 +319,11 @@ public class DeserializationTests {
|
||||
|
||||
private TcpDeserializationExceptionEvent doDeserialize(AbstractByteArraySerializer deser, String expectedMessage,
|
||||
byte[] data, int mms) {
|
||||
final AtomicReference<TcpDeserializationExceptionEvent> event =
|
||||
new AtomicReference<TcpDeserializationExceptionEvent>();
|
||||
class Publisher implements ApplicationEventPublisher {
|
||||
|
||||
@Override
|
||||
public void publishEvent(ApplicationEvent anEvent) {
|
||||
event.set((TcpDeserializationExceptionEvent) anEvent);
|
||||
}
|
||||
AtomicReference<TcpDeserializationExceptionEvent> event = new AtomicReference<>();
|
||||
|
||||
@Override
|
||||
public void publishEvent(Object event) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Publisher publisher = new Publisher();
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(data);
|
||||
deser.setApplicationEventPublisher(publisher);
|
||||
deser.setApplicationEventPublisher(anEvent -> event.set((TcpDeserializationExceptionEvent) anEvent));
|
||||
deser.setMaxMessageSize(mms);
|
||||
try {
|
||||
deser.deserialize(bais);
|
||||
@@ -362,16 +338,16 @@ public class DeserializationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTimeoutWithCustomDeserializer() throws Exception {
|
||||
public void testTimeoutWithCustomDeserializer() {
|
||||
testTimeoutWhileDecoding(new CustomDeserializer(), "\u0000\u0002\u0000\u0005reply");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTimeoutWithRawDeserializer() throws Exception {
|
||||
public void testTimeoutWithRawDeserializer() {
|
||||
testTimeoutWhileDecoding(new ByteArrayRawSerializer(), "reply");
|
||||
}
|
||||
|
||||
public void testTimeoutWhileDecoding(AbstractByteArraySerializer deserializer, String reply) throws Exception {
|
||||
private void testTimeoutWhileDecoding(AbstractByteArraySerializer deserializer, String reply) {
|
||||
ByteArrayRawSerializer serializer = new ByteArrayRawSerializer();
|
||||
TcpNioServerConnectionFactory serverNio = new TcpNioServerConnectionFactory(0);
|
||||
ByteArrayLengthHeaderSerializer lengthHeaderSerializer = new ByteArrayLengthHeaderSerializer(1);
|
||||
@@ -407,23 +383,21 @@ public class DeserializationTests {
|
||||
// eat SocketTimeoutException. Doesn't matter for this test
|
||||
}
|
||||
};
|
||||
Executor exec = new SimpleAsyncTaskExecutor("-");
|
||||
try (SimpleAsyncTaskExecutor exec = new SimpleAsyncTaskExecutor("-")) {
|
||||
exec.execute(command);
|
||||
}
|
||||
|
||||
Message<?> message;
|
||||
|
||||
// short reply should not be received.
|
||||
exec.execute(command);
|
||||
message = serverSideChannel.receive(10000);
|
||||
Message<?> message = serverSideChannel.receive(10000);
|
||||
assertThat(message).isNotNull();
|
||||
assertThat(new String((byte[]) message.getPayload())).isEqualTo("Test");
|
||||
String shortReply = reply.substring(0, reply.length() - 1);
|
||||
((MessageChannel) message.getHeaders().getReplyChannel()).send(new GenericMessage<String>(shortReply));
|
||||
((MessageChannel) message.getHeaders().getReplyChannel()).send(new GenericMessage<>(shortReply));
|
||||
message = outputChannel.receive(1000);
|
||||
assertThat(message).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTimeoutWithRawDeserializerEofIsTerminator() throws Exception {
|
||||
public void testTimeoutWithRawDeserializerEofIsTerminator() {
|
||||
ByteArrayRawSerializer serializer = new ByteArrayRawSerializer();
|
||||
TcpNioServerConnectionFactory serverNio = new TcpNioServerConnectionFactory(0);
|
||||
ByteArrayLengthHeaderSerializer lengthHeaderSerializer = new ByteArrayLengthHeaderSerializer(1);
|
||||
@@ -459,15 +433,15 @@ public class DeserializationTests {
|
||||
// eat SocketTimeoutException. Doesn't matter for this test
|
||||
}
|
||||
};
|
||||
Executor exec = new SimpleAsyncTaskExecutor("testTimeoutWithRawDeserializerEofIsTerminator-");
|
||||
|
||||
Message<?> message;
|
||||
try (SimpleAsyncTaskExecutor exec = new SimpleAsyncTaskExecutor("testTimeoutWithRawDeserializerEofIsTerminator-")) {
|
||||
exec.execute(command);
|
||||
}
|
||||
|
||||
exec.execute(command);
|
||||
message = serverSideChannel.receive(10000);
|
||||
Message<?> message = serverSideChannel.receive(10000);
|
||||
assertThat(message).isNotNull();
|
||||
assertThat(new String((byte[]) message.getPayload())).isEqualTo("Test");
|
||||
((MessageChannel) message.getHeaders().getReplyChannel()).send(new GenericMessage<String>("reply"));
|
||||
((MessageChannel) message.getHeaders().getReplyChannel()).send(new GenericMessage<>("reply"));
|
||||
message = outputChannel.receive(10000);
|
||||
assertThat(message).isNotNull();
|
||||
assertThat(new String(((byte[]) message.getPayload()))).isEqualTo("reply");
|
||||
@@ -529,7 +503,7 @@ public class DeserializationTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(byte[] object, OutputStream outputStream) throws IOException {
|
||||
public void serialize(byte[] object, OutputStream outputStream) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -27,7 +27,6 @@ import org.junit.Test;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
|
||||
|
||||
/**
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -41,4 +41,5 @@ public class MapJsonSerializerTests {
|
||||
map = deserializer.deserialize(bais);
|
||||
assertThat(map).isNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -28,7 +28,6 @@ import org.springframework.messaging.Message;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* For both .net. and .nio. adapters, creates a single server and 10 clients
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2024 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,4 +36,5 @@ public class SyslogdTests {
|
||||
System.in.read();
|
||||
ctx.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -77,7 +77,6 @@ public class UdpMulticastEndToEndTests implements Runnable {
|
||||
|
||||
private static long hangAroundFor = 0;
|
||||
|
||||
|
||||
@Test
|
||||
public void runIt() throws Exception {
|
||||
String location = "org/springframework/integration/ip/udp/testIp-out-multicast-context.xml";
|
||||
@@ -198,7 +197,6 @@ public class UdpMulticastEndToEndTests implements Runnable {
|
||||
ctx.close();
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
hangAroundFor = 120000;
|
||||
new UdpMulticastEndToEndTests().runIt();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -124,7 +124,6 @@ public class UdpUnicastEndToEndTests implements Runnable {
|
||||
return applicationContext;
|
||||
}
|
||||
|
||||
|
||||
public void launchSender(ApplicationContext applicationContext) throws Exception {
|
||||
DestinationResolver<MessageChannel> channelResolver = new BeanFactoryChannelResolver(applicationContext);
|
||||
MessageChannel inputChannel = channelResolver.resolveDestination("inputChannel");
|
||||
@@ -213,7 +212,6 @@ public class UdpUnicastEndToEndTests implements Runnable {
|
||||
ctx.close();
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
hangAroundFor = 120000;
|
||||
new UdpUnicastEndToEndTests().runIt();
|
||||
|
||||
Reference in New Issue
Block a user