Fix assertion for startup info format

See gh-21926
pull/21936/head
Stephane Nicoll 4 years ago
parent 961b7cdf81
commit 164a992d6e

@ -47,10 +47,10 @@ class StartupInfoLoggerTests {
new StartupInfoLogger(getClass()).logStarting(this.log); new StartupInfoLogger(getClass()).logStarting(this.log);
ArgumentCaptor<Object> captor = ArgumentCaptor.forClass(Object.class); ArgumentCaptor<Object> captor = ArgumentCaptor.forClass(Object.class);
verify(this.log).info(captor.capture()); 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 " + System.getProperty("java.version") + " on " + InetAddress.getLocalHost().getHostName() + " with PID "
+ new ApplicationPid() + " \\(started by " + System.getProperty("user.name") + " in " + new ApplicationPid() + " (started by " + System.getProperty("user.name") + " in "
+ System.getProperty("user.dir") + "\\)"); + System.getProperty("user.dir") + ")");
} }
@Test @Test

Loading…
Cancel
Save