From 3591f4d614bd3a388a9f56b183de0fe0d670b66b Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 27 Sep 2023 18:21:24 -0700 Subject: [PATCH] Restore test ensuring maxInboundMessageBodySize property matches default See gh-37603 --- .../boot/autoconfigure/amqp/RabbitPropertiesTests.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java index 61e89c0822..c543033365 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java @@ -16,6 +16,7 @@ package org.springframework.boot.autoconfigure.amqp; +import com.rabbitmq.client.ConnectionFactory; import org.junit.jupiter.api.Test; import org.springframework.amqp.rabbit.config.DirectRabbitListenerContainerFactory; @@ -313,6 +314,13 @@ class RabbitPropertiesTests { assertThat(this.properties.getSsl().determineEnabled()).isTrue(); } + @Test + void propertiesUseConsistentDefaultValues() { + ConnectionFactory connectionFactory = new ConnectionFactory(); + assertThat(connectionFactory).hasFieldOrPropertyWithValue("maxInboundMessageBodySize", + (int) this.properties.getMaxInboundMessageBodySize().toBytes()); + } + @Test void simpleContainerUseConsistentDefaultValues() { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();