From 205018ec8f1b1d181de3d82d1e901b6dbf5dfffc Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 7 Feb 2023 16:24:08 +0000 Subject: [PATCH] Fix HazelcastAutoConfigurationServerTests on Windows See gh-33687 --- .../hazelcast/HazelcastAutoConfigurationServerTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java index ade244bea2e..4184272b94f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java @@ -156,7 +156,8 @@ class HazelcastAutoConfigurationServerTests { return (context) -> { Config config = context.getBean(HazelcastInstance.class).getConfig(); String configurationLocation = (config.getConfigurationUrl() != null) - ? config.getConfigurationUrl().toString() : config.getConfigurationFile().getAbsolutePath(); + ? config.getConfigurationUrl().toString() + : config.getConfigurationFile().toURI().toURL().toString(); assertThat(configurationLocation).endsWith(location); }; }