Commit 068e22d6 authored by Johnny Lim's avatar Johnny Lim Committed by Stephane Nicoll

Polish

See gh-13776
parent f325ee94
...@@ -60,7 +60,7 @@ public class JndiConnectionFactoryAutoConfigurationTests { ...@@ -60,7 +60,7 @@ public class JndiConnectionFactoryAutoConfigurationTests {
} }
@After @After
public void close() { public void cleanUp() {
TestableInitialContextFactory.clearAll(); TestableInitialContextFactory.clearAll();
if (this.initialContextFactory != null) { if (this.initialContextFactory != null) {
System.setProperty(Context.INITIAL_CONTEXT_FACTORY, System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
......
...@@ -75,7 +75,7 @@ public class UndertowWebServerFactoryCustomizerTests { ...@@ -75,7 +75,7 @@ public class UndertowWebServerFactoryCustomizerTests {
} }
@Test @Test
public void deduceUseForwardHeadersUndertow() { public void deduceUseForwardHeaders() {
this.environment.setProperty("DYNO", "-"); this.environment.setProperty("DYNO", "-");
ConfigurableUndertowWebServerFactory factory = mock( ConfigurableUndertowWebServerFactory factory = mock(
ConfigurableUndertowWebServerFactory.class); ConfigurableUndertowWebServerFactory.class);
...@@ -84,7 +84,7 @@ public class UndertowWebServerFactoryCustomizerTests { ...@@ -84,7 +84,7 @@ public class UndertowWebServerFactoryCustomizerTests {
} }
@Test @Test
public void defaultUseForwardHeadersUndertow() { public void defaultUseForwardHeaders() {
ConfigurableUndertowWebServerFactory factory = mock( ConfigurableUndertowWebServerFactory factory = mock(
ConfigurableUndertowWebServerFactory.class); ConfigurableUndertowWebServerFactory.class);
this.customizer.customize(factory); this.customizer.customize(factory);
...@@ -92,7 +92,7 @@ public class UndertowWebServerFactoryCustomizerTests { ...@@ -92,7 +92,7 @@ public class UndertowWebServerFactoryCustomizerTests {
} }
@Test @Test
public void setUseForwardHeadersUndertow() { public void setUseForwardHeaders() {
this.serverProperties.setUseForwardHeaders(true); this.serverProperties.setUseForwardHeaders(true);
ConfigurableUndertowWebServerFactory factory = mock( ConfigurableUndertowWebServerFactory factory = mock(
ConfigurableUndertowWebServerFactory.class); ConfigurableUndertowWebServerFactory.class);
......
...@@ -149,10 +149,11 @@ public class FileSystemWatcherTests { ...@@ -149,10 +149,11 @@ public class FileSystemWatcherTests {
this.watcher.addSourceFolder(folder); this.watcher.addSourceFolder(folder);
this.watcher.start(); this.watcher.start();
folder.mkdirs(); folder.mkdirs();
touch(new File(folder, "text.txt")); File file = touch(new File(folder, "text.txt"));
this.watcher.stopAfter(1); this.watcher.stopAfter(1);
ChangedFiles changedFiles = getSingleChangedFiles(); ChangedFiles changedFiles = getSingleChangedFiles();
System.out.println(changedFiles); ChangedFile expected = new ChangedFile(folder, file, Type.ADD);
assertThat(changedFiles.getFiles()).contains(expected);
} }
@Test @Test
......
...@@ -75,6 +75,11 @@ public abstract class Slf4JLoggingSystem extends AbstractLoggingSystem { ...@@ -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() { protected final boolean isBridgeJulIntoSlf4j() {
return isBridgeHandlerAvailable() && isJulUsingItsDefaultConfiguration(); return isBridgeHandlerAvailable() && isJulUsingItsDefaultConfiguration();
} }
......
...@@ -63,7 +63,8 @@ public class SampleWebJspApplicationTests { ...@@ -63,7 +63,8 @@ public class SampleWebJspApplicationTests {
URI.create("/foo")); URI.create("/foo"));
ResponseEntity<String> entity = this.restTemplate.exchange(request, String.class); ResponseEntity<String> entity = this.restTemplate.exchange(request, String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); 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");
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment