From b79de1e7e321e13f105a405e5c52c5b63bf99113 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 26 Jul 2019 16:26:37 +0200 Subject: [PATCH] Fix broken build --- .../autoconfigure/amqp/RabbitAutoConfigurationTests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java index f76664fc27..670fe0eb3c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoConfigurationTests.java @@ -17,6 +17,7 @@ package org.springframework.boot.autoconfigure.amqp; import java.security.NoSuchAlgorithmException; +import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import javax.net.ssl.SSLContext; @@ -137,7 +138,7 @@ public class RabbitAutoConfigurationTests { assertThat(connectionFactory.getVirtualHost()).isEqualTo("/vhost"); com.rabbitmq.client.ConnectionFactory rcf = connectionFactory.getRabbitConnectionFactory(); assertThat(rcf.getConnectionTimeout()).isEqualTo(123); - assertThat((Address[]) ReflectionTestUtils.getField(connectionFactory, "addresses")).hasSize(1); + assertThat((List
) ReflectionTestUtils.getField(connectionFactory, "addresses")).hasSize(1); }); } @@ -145,7 +146,7 @@ public class RabbitAutoConfigurationTests { public void testConnectionFactoryWithCustomConnectionNameStrategy() { this.contextRunner.withUserConfiguration(ConnectionNameStrategyConfiguration.class).run((context) -> { CachingConnectionFactory connectionFactory = context.getBean(CachingConnectionFactory.class); - Address[] addresses = (Address[]) ReflectionTestUtils.getField(connectionFactory, "addresses"); + List
addresses = (List
) ReflectionTestUtils.getField(connectionFactory, "addresses"); assertThat(addresses).hasSize(1); com.rabbitmq.client.ConnectionFactory rcf = mock(com.rabbitmq.client.ConnectionFactory.class); given(rcf.newConnection(isNull(), eq(addresses), anyString())).willReturn(mock(Connection.class));