Name executors in IP tests
- aid in debugging failing tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 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.
|
||||
@@ -99,7 +99,7 @@ public class TcpOutboundGatewayTests {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(TcpOutboundGatewayTests.class);
|
||||
|
||||
private final AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor();
|
||||
private final AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor("TcpOutboundGatewayTests");
|
||||
|
||||
@Test
|
||||
void testGoodNetSingle() throws Exception {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2021 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.
|
||||
@@ -100,7 +100,7 @@ public class TcpReceivingChannelAdapterTests extends AbstractTcpChannelAdapterTe
|
||||
final CountDownLatch latch1 = new CountDownLatch(1);
|
||||
final CountDownLatch latch2 = new CountDownLatch(1);
|
||||
final AtomicBoolean done = new AtomicBoolean();
|
||||
new SimpleAsyncTaskExecutor().execute(() -> {
|
||||
new SimpleAsyncTaskExecutor("testNetClientMode").execute(() -> {
|
||||
try {
|
||||
ServerSocket server = ServerSocketFactory.getDefault().createServerSocket(0, 10);
|
||||
serverSocket.set(server);
|
||||
@@ -412,7 +412,7 @@ public class TcpReceivingChannelAdapterTests extends AbstractTcpChannelAdapterTe
|
||||
handler.setConnectionFactory(scf);
|
||||
TcpReceivingChannelAdapter adapter = new TcpReceivingChannelAdapter();
|
||||
adapter.setConnectionFactory(scf);
|
||||
Executor te = new SimpleAsyncTaskExecutor();
|
||||
Executor te = new SimpleAsyncTaskExecutor("testNioSingleSharedMany");
|
||||
scf.setTaskExecutor(te);
|
||||
scf.start();
|
||||
QueueChannel channel = new QueueChannel();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2021 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.
|
||||
@@ -84,7 +84,7 @@ public class TcpSendingMessageHandlerTests extends AbstractTcpChannelAdapterTest
|
||||
|
||||
private static final Log logger = LogFactory.getLog(TcpSendingMessageHandlerTests.class);
|
||||
|
||||
private AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor();
|
||||
private final AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor("TcpSendingMessageHandlerTests");
|
||||
|
||||
private void readFully(InputStream is, byte[] buff) throws IOException {
|
||||
for (int i = 0; i < buff.length; i++) {
|
||||
|
||||
@@ -751,7 +751,7 @@ public class CachingClientConnectionFactoryTests {
|
||||
invocation.callRealMethod();
|
||||
String log = ((Supplier<String>) invocation.getArgument(0)).get();
|
||||
if (log.startsWith("Response")) {
|
||||
new SimpleAsyncTaskExecutor()
|
||||
new SimpleAsyncTaskExecutor("testGatewayRelease")
|
||||
.execute(() -> gate.handleMessage(new GenericMessage<>("bar")));
|
||||
// hold up the first thread until the second has added its pending reply
|
||||
latch.await(20, TimeUnit.SECONDS);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 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.
|
||||
@@ -228,7 +228,7 @@ public class ConnectionFactoryTests {
|
||||
factory.start();
|
||||
assertThat(latch1.await(10, TimeUnit.SECONDS)).as("missing info log").isTrue();
|
||||
// stop on a different thread because it waits for the executor
|
||||
new SimpleAsyncTaskExecutor()
|
||||
new SimpleAsyncTaskExecutor("testEarlyClose")
|
||||
.execute(factory::stop);
|
||||
int n = 0;
|
||||
DirectFieldAccessor accessor = new DirectFieldAccessor(factory);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 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.
|
||||
@@ -609,7 +609,7 @@ public class FailoverClientConnectionFactoryTests {
|
||||
private Holder setupAndStartServers(AbstractServerConnectionFactory server1,
|
||||
AbstractServerConnectionFactory server2) {
|
||||
|
||||
Executor exec = new SimpleAsyncTaskExecutor();
|
||||
Executor exec = new SimpleAsyncTaskExecutor("FailoverClientConnectionFactoryTests");
|
||||
server1.setTaskExecutor(exec);
|
||||
server2.setTaskExecutor(exec);
|
||||
server1.setBeanName("server1");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 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.
|
||||
@@ -109,7 +109,7 @@ public class TcpNioConnectionTests {
|
||||
|
||||
private final ApplicationEventPublisher nullPublisher = mock(ApplicationEventPublisher.class);
|
||||
|
||||
private final AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor();
|
||||
private final AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor("TcpNioConnectionTests");
|
||||
|
||||
@Test
|
||||
public void testWriteTimeout(TestInfo testInfo) throws Exception {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2021 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.
|
||||
@@ -407,7 +407,7 @@ public class DeserializationTests {
|
||||
// eat SocketTimeoutException. Doesn't matter for this test
|
||||
}
|
||||
};
|
||||
Executor exec = new SimpleAsyncTaskExecutor();
|
||||
Executor exec = new SimpleAsyncTaskExecutor("testTimeoutWhileDecoding");
|
||||
|
||||
Message<?> message;
|
||||
|
||||
@@ -459,7 +459,7 @@ public class DeserializationTests {
|
||||
// eat SocketTimeoutException. Doesn't matter for this test
|
||||
}
|
||||
};
|
||||
Executor exec = new SimpleAsyncTaskExecutor();
|
||||
Executor exec = new SimpleAsyncTaskExecutor("testTimeoutWithRawDeserializerEofIsTerminator");
|
||||
|
||||
Message<?> message;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 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.
|
||||
@@ -90,7 +90,7 @@ public class DatagramPacketMulticastSendingHandlerTests {
|
||||
e.printStackTrace();
|
||||
}
|
||||
};
|
||||
Executor executor = new SimpleAsyncTaskExecutor();
|
||||
Executor executor = new SimpleAsyncTaskExecutor("verifySendMulticast");
|
||||
executor.execute(catcher);
|
||||
executor.execute(catcher);
|
||||
assertThat(listening.await(10000, TimeUnit.MILLISECONDS)).isTrue();
|
||||
@@ -191,7 +191,7 @@ public class DatagramPacketMulticastSendingHandlerTests {
|
||||
e.printStackTrace();
|
||||
}
|
||||
};
|
||||
Executor executor = new SimpleAsyncTaskExecutor();
|
||||
Executor executor = new SimpleAsyncTaskExecutor("verifySendMulticastWithAcks");
|
||||
executor.execute(catcher);
|
||||
executor.execute(catcher);
|
||||
assertThat(listening.await(10000, TimeUnit.MILLISECONDS)).isTrue();
|
||||
|
||||
Reference in New Issue
Block a user