From 1e0a3a946dca65aea1e54b650b47fe858993a2ec Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 26 Apr 2021 17:36:58 -0700 Subject: [PATCH] Fix binding random properties test See gh-26201 --- .../boot/context/properties/ConfigurationPropertiesTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java index 050c0e4826..619b12c71c 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java @@ -1067,7 +1067,7 @@ class ConfigurationPropertiesTests { MutablePropertySources sources = this.context.getEnvironment().getPropertySources(); sources.addFirst(new RandomValuePropertySource()); Map source = new HashMap<>(); - source.put("com.example.bar", "${random.int}"); + source.put("com.example.bar", "${random.int[100,200]}"); sources.addLast(new MapPropertySource("test", source)); load(SimplePrefixedProperties.class); SimplePrefixedProperties bean = this.context.getBean(SimplePrefixedProperties.class);