Some test improvement; fix new Sonar smell

This commit is contained in:
Artem Bilan
2021-02-26 14:20:49 -05:00
parent 40464ca4cf
commit be34fb6866
3 changed files with 24 additions and 20 deletions

View File

@@ -41,7 +41,7 @@
<poller trigger="customTrigger"/>
</inbound-channel-adapter>
<inbound-channel-adapter id="expressionElement" channel="triggerRefChannel">
<inbound-channel-adapter id="expressionElement" channel="triggerRefChannel" auto-startup="false">
<poller fixed-delay="1000"/>
<expression key="test.greeting"/>
</inbound-channel-adapter>

View File

@@ -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.
@@ -20,8 +20,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.jupiter.api.Test;
import org.springframework.beans.DirectFieldAccessor;
import org.springframework.beans.factory.annotation.Autowired;
@@ -32,8 +31,8 @@ import org.springframework.integration.test.util.TestUtils;
import org.springframework.scheduling.Trigger;
import org.springframework.scheduling.support.CronTrigger;
import org.springframework.scheduling.support.PeriodicTrigger;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
/**
* @author Mark Fisher
@@ -41,8 +40,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
*
* @since 2.0
*/
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@SpringJUnitConfig
@DirtiesContext
public class InboundChannelAdapterExpressionTests {
@Autowired