commit
						322191f288
					
				| 
						 | 
				
			
			@ -16,8 +16,6 @@
 | 
			
		|||
 | 
			
		||||
package org.springframework.boot.actuate.autoconfigure.data.redis;
 | 
			
		||||
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import reactor.core.publisher.Flux;
 | 
			
		||||
 | 
			
		||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
 | 
			
		||||
| 
						 | 
				
			
			@ -51,8 +49,7 @@ import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
 | 
			
		|||
public class RedisReactiveHealthContributorAutoConfiguration extends
 | 
			
		||||
		CompositeReactiveHealthContributorConfiguration<RedisReactiveHealthIndicator, ReactiveRedisConnectionFactory> {
 | 
			
		||||
 | 
			
		||||
	RedisReactiveHealthContributorAutoConfiguration(
 | 
			
		||||
			Map<String, ReactiveRedisConnectionFactory> redisConnectionFactories) {
 | 
			
		||||
	RedisReactiveHealthContributorAutoConfiguration() {
 | 
			
		||||
		super(RedisReactiveHealthIndicator::new);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -123,13 +123,11 @@ abstract class AbstractCompositeHealthContributorConfigurationTests<C, I extends
 | 
			
		|||
		@Bean(defaultCandidate = false)
 | 
			
		||||
		TestBean nonDefault() {
 | 
			
		||||
			return new TestBean();
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		@Bean(autowireCandidate = false)
 | 
			
		||||
		TestBean nonAutowire() {
 | 
			
		||||
			return new TestBean();
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -145,7 +143,6 @@ abstract class AbstractCompositeHealthContributorConfigurationTests<C, I extends
 | 
			
		|||
		@Bean(autowireCandidate = false)
 | 
			
		||||
		TestBean nonAutowire() {
 | 
			
		||||
			return new TestBean();
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,7 +44,7 @@ import org.springframework.context.annotation.DependsOn;
 | 
			
		|||
public @interface AutoConfigureBefore {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * The auto-configure classes that should have not yet been applied.
 | 
			
		||||
	 * The auto-configuration classes that should have not yet been applied.
 | 
			
		||||
	 * @return the classes
 | 
			
		||||
	 */
 | 
			
		||||
	Class<?>[] value() default {};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -447,7 +447,7 @@ public class Log4J2LoggingSystem extends AbstractLoggingSystem {
 | 
			
		|||
		super.cleanUp();
 | 
			
		||||
		LoggerContext loggerContext = getLoggerContext();
 | 
			
		||||
		markAsUninitialized(loggerContext);
 | 
			
		||||
		StatusConsoleListener listener = (StatusConsoleListener) getLoggerContext().getObject(STATUS_LISTENER_KEY);
 | 
			
		||||
		StatusConsoleListener listener = (StatusConsoleListener) loggerContext.getObject(STATUS_LISTENER_KEY);
 | 
			
		||||
		if (listener != null) {
 | 
			
		||||
			StatusLogger.getLogger().removeListener(listener);
 | 
			
		||||
			loggerContext.removeObject(STATUS_LISTENER_KEY);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -146,15 +146,15 @@ public class ServletWebServerApplicationContext extends GenericWebApplicationCon
 | 
			
		|||
			super.refresh();
 | 
			
		||||
		}
 | 
			
		||||
		catch (RuntimeException ex) {
 | 
			
		||||
			try {
 | 
			
		||||
				WebServer webServer = this.webServer;
 | 
			
		||||
				if (webServer != null) {
 | 
			
		||||
			WebServer webServer = this.webServer;
 | 
			
		||||
			if (webServer != null) {
 | 
			
		||||
				try {
 | 
			
		||||
					webServer.stop();
 | 
			
		||||
					webServer.destroy();
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			catch (RuntimeException stopOrDestroyEx) {
 | 
			
		||||
				ex.addSuppressed(stopOrDestroyEx);
 | 
			
		||||
				catch (RuntimeException stopOrDestroyEx) {
 | 
			
		||||
					ex.addSuppressed(stopOrDestroyEx);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			throw ex;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,6 +44,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
 | 
			
		|||
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
 | 
			
		||||
import static org.mockito.BDDMockito.then;
 | 
			
		||||
import static org.mockito.BDDMockito.willThrow;
 | 
			
		||||
import static org.mockito.Mockito.never;
 | 
			
		||||
import static org.mockito.Mockito.times;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			@ -148,7 +149,7 @@ class ReactiveWebServerApplicationContextTests {
 | 
			
		|||
			.withStackTraceContaining("WebServer has failed to stop");
 | 
			
		||||
		WebServer webServer = this.context.getWebServer();
 | 
			
		||||
		then(webServer).should().stop();
 | 
			
		||||
		then(webServer).should(times(0)).destroy();
 | 
			
		||||
		then(webServer).should(never()).destroy();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Test
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,6 +86,7 @@ import static org.mockito.BDDMockito.willThrow;
 | 
			
		|||
import static org.mockito.Mockito.atMost;
 | 
			
		||||
import static org.mockito.Mockito.inOrder;
 | 
			
		||||
import static org.mockito.Mockito.mock;
 | 
			
		||||
import static org.mockito.Mockito.never;
 | 
			
		||||
import static org.mockito.Mockito.times;
 | 
			
		||||
import static org.mockito.Mockito.withSettings;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -236,7 +237,7 @@ class ServletWebServerApplicationContextTests {
 | 
			
		|||
			.withStackTraceContaining("WebServer has failed to stop");
 | 
			
		||||
		WebServer webServer = this.context.getWebServer();
 | 
			
		||||
		then(webServer).should().stop();
 | 
			
		||||
		then(webServer).should(times(0)).destroy();
 | 
			
		||||
		then(webServer).should(never()).destroy();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Test
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -169,7 +169,7 @@ import static org.mockito.ArgumentMatchers.any;
 | 
			
		|||
import static org.mockito.BDDMockito.then;
 | 
			
		||||
import static org.mockito.Mockito.inOrder;
 | 
			
		||||
import static org.mockito.Mockito.mock;
 | 
			
		||||
import static org.mockito.Mockito.times;
 | 
			
		||||
import static org.mockito.Mockito.never;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Base for testing classes that extends {@link AbstractServletWebServerFactory}.
 | 
			
		||||
| 
						 | 
				
			
			@ -1193,7 +1193,7 @@ public abstract class AbstractServletWebServerFactoryTests {
 | 
			
		|||
		this.webServer = getFactory().getWebServer((servletContext) -> servletContext.addListener(listener));
 | 
			
		||||
		this.webServer.start();
 | 
			
		||||
		this.webServer.stop();
 | 
			
		||||
		then(listener).should(times(0)).contextDestroyed(any(ServletContextEvent.class));
 | 
			
		||||
		then(listener).should(never()).contextDestroyed(any(ServletContextEvent.class));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Test
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue