Fix imports in DelayHandlerTests

https://build.spring.io/browse/INT-SI50X-135/

* Rename to `RouterConcurrencyTests` for consistency
This commit is contained in:
Artem Bilan
2018-08-28 16:23:31 -04:00
parent af51c9bf3e
commit 1ca1b2c165
2 changed files with 5 additions and 4 deletions

View File

@@ -45,7 +45,6 @@ import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.support.StaticApplicationContext;
import org.springframework.expression.Expression;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.integration.StaticMessageHeaderAccessor;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.channel.MessagePublishingErrorHandler;
import org.springframework.integration.channel.QueueChannel;
@@ -54,6 +53,7 @@ import org.springframework.integration.store.MessageGroup;
import org.springframework.integration.store.MessageGroupStore;
import org.springframework.integration.store.SimpleMessageStore;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.support.StaticMessageHeaderAccessor;
import org.springframework.integration.test.util.TestUtils;
import org.springframework.integration.test.util.TestUtils.TestApplicationContext;
import org.springframework.messaging.Message;

View File

@@ -42,16 +42,18 @@ import org.springframework.messaging.MessageChannel;
/**
* @author Gary Russell
*
* @since 3.0
*
*/
public class RouterConcurrencyTest {
public class RouterConcurrencyTests {
@Test
public void test() throws Exception {
final AtomicInteger count = new AtomicInteger();
final Semaphore semaphore = new Semaphore(1);
final AbstractMessageRouter router = new AbstractMessageRouter() {
@Override
protected Collection<MessageChannel> determineTargetChannels(Message<?> message) {
return null;
@@ -85,8 +87,7 @@ public class RouterConcurrencyTest {
router.setBeanFactory(beanFactory);
ExecutorService exec = Executors.newFixedThreadPool(2);
final List<ConversionService> returns = Collections.synchronizedList(
new ArrayList<ConversionService>());
final List<ConversionService> returns = Collections.synchronizedList(new ArrayList<>());
Runnable runnable = () -> {
ConversionService requiredConversionService = router.getRequiredConversionService();
returns.add(requiredConversionService);