From 164a992d6e2759732eb7904b6199f313f8779566 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 15 Jun 2020 20:17:07 +0200 Subject: [PATCH] Fix assertion for startup info format See gh-21926 --- .../org/springframework/boot/StartupInfoLoggerTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/StartupInfoLoggerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/StartupInfoLoggerTests.java index 7563cfd43e..7649697704 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/StartupInfoLoggerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/StartupInfoLoggerTests.java @@ -47,10 +47,10 @@ class StartupInfoLoggerTests { new StartupInfoLogger(getClass()).logStarting(this.log); ArgumentCaptor captor = ArgumentCaptor.forClass(Object.class); verify(this.log).info(captor.capture()); - assertThat(captor.getValue().toString()).matches("Starting " + getClass().getSimpleName() + " using Java " + assertThat(captor.getValue().toString()).contains("Starting " + getClass().getSimpleName() + " using Java " + System.getProperty("java.version") + " on " + InetAddress.getLocalHost().getHostName() + " with PID " - + new ApplicationPid() + " \\(started by " + System.getProperty("user.name") + " in " - + System.getProperty("user.dir") + "\\)"); + + new ApplicationPid() + " (started by " + System.getProperty("user.name") + " in " + + System.getProperty("user.dir") + ")"); } @Test