GH-2803: Deprecate legacy metrics
Resolves https://github.com/spring-projects/spring-integration/issues/2803 * Polishing - PR Comments * More PR Comments * Missed one comment
This commit is contained in:
committed by
Artem Bilan
parent
43d03c35b1
commit
6c3ffcb1d5
@@ -148,7 +148,7 @@ public class GlobalChannelInterceptorTests {
|
||||
ConfigurableListableBeanFactory beanFactory = this.applicationContext.getBeanFactory();
|
||||
beanFactory.initializeBean(testChannel, "testChannel");
|
||||
|
||||
List<ChannelInterceptor> channelInterceptors = testChannel.getChannelInterceptors();
|
||||
List<ChannelInterceptor> channelInterceptors = testChannel.getInterceptors();
|
||||
|
||||
assertThat(channelInterceptors.size()).isEqualTo(2);
|
||||
assertThat(channelInterceptors.get(0)).isInstanceOf(SampleInterceptor.class);
|
||||
|
||||
@@ -87,7 +87,7 @@ public class GlobalWireTapTests {
|
||||
|
||||
assertThat(this.wiretapAll2.receive(1)).isNull();
|
||||
|
||||
assertThat(this.channel.getChannelInterceptors().size()).isEqualTo(4);
|
||||
assertThat(this.channel.getInterceptors().size()).isEqualTo(4);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -53,15 +53,15 @@ public class ImplicitConsumerChannelTests {
|
||||
@Test
|
||||
public void testImplicit() {
|
||||
// used to fail to load AC (no channel 'bar')
|
||||
List<ChannelInterceptor> barInterceptors = bar.getChannelInterceptors();
|
||||
List<ChannelInterceptor> barInterceptors = bar.getInterceptors();
|
||||
assertThat(barInterceptors.size()).isEqualTo(2);
|
||||
assertThat(barInterceptors.get(0)).isInstanceOfAny(Interceptor1.class, Interceptor2.class);
|
||||
assertThat(barInterceptors.get(1)).isInstanceOfAny(Interceptor1.class, Interceptor2.class);
|
||||
List<ChannelInterceptor> fooInterceptors = foo.getChannelInterceptors();
|
||||
List<ChannelInterceptor> fooInterceptors = foo.getInterceptors();
|
||||
assertThat(fooInterceptors.size()).isEqualTo(2);
|
||||
assertThat(fooInterceptors.get(0)).isInstanceOfAny(WireTap.class, Interceptor2.class);
|
||||
assertThat(fooInterceptors.get(1)).isInstanceOfAny(WireTap.class, Interceptor2.class);
|
||||
List<ChannelInterceptor> bazInterceptors = baz.getChannelInterceptors();
|
||||
List<ChannelInterceptor> bazInterceptors = baz.getInterceptors();
|
||||
assertThat(bazInterceptors.size()).isEqualTo(2);
|
||||
assertThat(bazInterceptors.get(0)).isInstanceOfAny(WireTap.class, Interceptor1.class);
|
||||
assertThat(bazInterceptors.get(1)).isInstanceOfAny(WireTap.class, Interceptor1.class);
|
||||
|
||||
@@ -472,8 +472,8 @@ public class EnableIntegrationTests {
|
||||
child.refresh();
|
||||
AbstractMessageChannel foo = child.getBean("foo", AbstractMessageChannel.class);
|
||||
ChannelInterceptor baz = child.getBean("baz", ChannelInterceptor.class);
|
||||
assertThat(foo.getChannelInterceptors().contains(baz)).isTrue();
|
||||
assertThat(this.output.getChannelInterceptors().contains(baz)).isFalse();
|
||||
assertThat(foo.getInterceptors().contains(baz)).isTrue();
|
||||
assertThat(this.output.getInterceptors().contains(baz)).isFalse();
|
||||
child.close();
|
||||
}
|
||||
|
||||
@@ -485,8 +485,8 @@ public class EnableIntegrationTests {
|
||||
child.refresh();
|
||||
AbstractMessageChannel foo = child.getBean("foo", AbstractMessageChannel.class);
|
||||
ChannelInterceptor baz = child.getBean("baz", ChannelInterceptor.class);
|
||||
assertThat(foo.getChannelInterceptors().contains(baz)).isTrue();
|
||||
assertThat(this.output.getChannelInterceptors().contains(baz)).isFalse();
|
||||
assertThat(foo.getInterceptors().contains(baz)).isTrue();
|
||||
assertThat(this.output.getInterceptors().contains(baz)).isFalse();
|
||||
child.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.beans.factory.BeanCreationNotAllowedException;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.ListableBeanFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
||||
@@ -574,8 +573,7 @@ public class ManualFlowTests {
|
||||
|
||||
}
|
||||
|
||||
private final class BeanFactoryHandler extends AbstractReplyProducingMessageHandler
|
||||
implements DisposableBean {
|
||||
private final class BeanFactoryHandler extends AbstractReplyProducingMessageHandler {
|
||||
|
||||
@Autowired
|
||||
private BeanFactory beanFactory;
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.springframework.util.StopWatch;
|
||||
* @author Artem Bilan
|
||||
*/
|
||||
@Ignore("Very sensitive to the time. Don't forget to test after some changes.")
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ExponentialMovingAverageRateTests {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(ExponentialMovingAverageRateTests.class);
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.springframework.integration.test.util.TestUtils;
|
||||
* @author Steven Swor
|
||||
*/
|
||||
@Ignore("Very sensitive to the time. Don't forget to test after some changes.")
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ExponentialMovingAverageRatioTests {
|
||||
|
||||
private final ExponentialMovingAverageRatio history = new ExponentialMovingAverageRatio(0.5, 10, true);
|
||||
@@ -69,7 +70,7 @@ public class ExponentialMovingAverageRatioTests {
|
||||
* time.
|
||||
*/
|
||||
double timeSinceLastMeasurement = history.getTimeSinceLastMeasurement();
|
||||
assertThat(timeSinceLastMeasurement).isGreaterThan((double) (sleepTime / 100));
|
||||
assertThat(timeSinceLastMeasurement).isGreaterThan(sleepTime / 100);
|
||||
assertThat(timeSinceLastMeasurement).isLessThanOrEqualTo(1.5 * sleepTime / 100);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.junit.Test;
|
||||
* @author Gary Russell
|
||||
*/
|
||||
@Ignore("Very sensitive to the time. Don't forget to test after some changes.")
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ExponentialMovingAverageTests {
|
||||
|
||||
private final ExponentialMovingAverage history = new ExponentialMovingAverage(10);
|
||||
|
||||
Reference in New Issue
Block a user