From 3fdf2818b30093e240b529cf4b98023e552c3a35 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 7 Mar 2019 09:22:42 +0000 Subject: [PATCH] Remove reliance on side-effects in LogbackLoggingSystemTests Closes gh-16160 --- .../boot/logging/logback/LogbackLoggingSystemTests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java b/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java index d008f4c21e..c9a9aaad40 100644 --- a/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/logging/logback/LogbackLoggingSystemTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -128,8 +128,9 @@ public class LogbackLoggingSystemTests extends AbstractLoggingSystemTests { } @Test - public void testBasicConfigLocation() throws Exception { + public void defaultConfigConfiguresAConsoleAppender() throws Exception { this.loggingSystem.beforeInitialize(); + this.loggingSystem.initialize(this.initializationContext, null, null); ILoggerFactory factory = StaticLoggerBinder.getSingleton().getLoggerFactory(); LoggerContext context = (LoggerContext) factory; Logger root = context.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);