diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JndiConnectionFactoryAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JndiConnectionFactoryAutoConfigurationTests.java index 89c6e775a02..abd42bfead0 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JndiConnectionFactoryAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JndiConnectionFactoryAutoConfigurationTests.java @@ -60,7 +60,7 @@ public class JndiConnectionFactoryAutoConfigurationTests { } @After - public void close() { + public void cleanUp() { TestableInitialContextFactory.clearAll(); if (this.initialContextFactory != null) { System.setProperty(Context.INITIAL_CONTEXT_FACTORY, diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java index 745c577829d..33d0121f44f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java @@ -75,7 +75,7 @@ public class UndertowWebServerFactoryCustomizerTests { } @Test - public void deduceUseForwardHeadersUndertow() { + public void deduceUseForwardHeaders() { this.environment.setProperty("DYNO", "-"); ConfigurableUndertowWebServerFactory factory = mock( ConfigurableUndertowWebServerFactory.class); @@ -84,7 +84,7 @@ public class UndertowWebServerFactoryCustomizerTests { } @Test - public void defaultUseForwardHeadersUndertow() { + public void defaultUseForwardHeaders() { ConfigurableUndertowWebServerFactory factory = mock( ConfigurableUndertowWebServerFactory.class); this.customizer.customize(factory); @@ -92,7 +92,7 @@ public class UndertowWebServerFactoryCustomizerTests { } @Test - public void setUseForwardHeadersUndertow() { + public void setUseForwardHeaders() { this.serverProperties.setUseForwardHeaders(true); ConfigurableUndertowWebServerFactory factory = mock( ConfigurableUndertowWebServerFactory.class); diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java index a084d6680ac..abaf6d742fd 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/filewatch/FileSystemWatcherTests.java @@ -149,10 +149,11 @@ public class FileSystemWatcherTests { this.watcher.addSourceFolder(folder); this.watcher.start(); folder.mkdirs(); - touch(new File(folder, "text.txt")); + File file = touch(new File(folder, "text.txt")); this.watcher.stopAfter(1); ChangedFiles changedFiles = getSingleChangedFiles(); - System.out.println(changedFiles); + ChangedFile expected = new ChangedFile(folder, file, Type.ADD); + assertThat(changedFiles.getFiles()).contains(expected); } @Test diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/Slf4JLoggingSystem.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/Slf4JLoggingSystem.java index 59e8a7675f2..92fb601b503 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/Slf4JLoggingSystem.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/Slf4JLoggingSystem.java @@ -75,6 +75,11 @@ public abstract class Slf4JLoggingSystem extends AbstractLoggingSystem { } } + /** + * Return whether bridging JUL into SLF4J or not. + * @return whether bridging JUL into SLF4J or not + * @since 2.0.4 + */ protected final boolean isBridgeJulIntoSlf4j() { return isBridgeHandlerAvailable() && isJulUsingItsDefaultConfiguration(); } diff --git a/spring-boot-samples/spring-boot-sample-web-jsp/src/test/java/sample/jsp/SampleWebJspApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-jsp/src/test/java/sample/jsp/SampleWebJspApplicationTests.java index 872f11858f6..98f389cab64 100644 --- a/spring-boot-samples/spring-boot-sample-web-jsp/src/test/java/sample/jsp/SampleWebJspApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-jsp/src/test/java/sample/jsp/SampleWebJspApplicationTests.java @@ -63,7 +63,8 @@ public class SampleWebJspApplicationTests { URI.create("/foo")); ResponseEntity entity = this.restTemplate.exchange(request, String.class); assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); - assertThat(entity.getBody()).contains("Something went wrong"); + assertThat(entity.getBody()) + .contains("Something went wrong: 500 Internal Server Error"); } }