pull/18464/head
Andy Wilkinson 5 years ago
parent af38dddd67
commit ab87b2a39b

@ -66,7 +66,7 @@ public class RedisHealthIndicator extends AbstractHealthIndicator {
}
}
finally {
RedisConnectionUtils.releaseConnection(connection, this.redisConnectionFactory);
RedisConnectionUtils.releaseConnection(connection, this.redisConnectionFactory, false);
}
}

@ -25,7 +25,6 @@ import org.junit.runner.RunWith;
import org.springframework.boot.actuate.endpoint.web.test.WebEndpointRunners;
import org.springframework.boot.logging.LogFile;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
@ -42,8 +41,6 @@ import org.springframework.util.FileCopyUtils;
@RunWith(WebEndpointRunners.class)
public class LogFileWebEndpointWebIntegrationTests {
private static ConfigurableApplicationContext context;
private static WebTestClient client;
@ClassRule

@ -100,6 +100,7 @@ public class BatchAutoConfiguration {
return factory;
}
@Configuration
@ConditionalOnBean(DataSource.class)
@ConditionalOnClass(DatabasePopulator.class)
static class DataSourceInitializerConfiguration {

@ -42,7 +42,6 @@ import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.core.io.ResourceLoader;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean;
@ -84,18 +83,15 @@ public class LiquibaseAutoConfiguration {
private final DataSourceProperties dataSourceProperties;
private final ResourceLoader resourceLoader;
private final DataSource dataSource;
private final DataSource liquibaseDataSource;
public LiquibaseConfiguration(LiquibaseProperties properties, DataSourceProperties dataSourceProperties,
ResourceLoader resourceLoader, ObjectProvider<DataSource> dataSource,
ObjectProvider<DataSource> dataSource,
@LiquibaseDataSource ObjectProvider<DataSource> liquibaseDataSource) {
this.properties = properties;
this.dataSourceProperties = dataSourceProperties;
this.resourceLoader = resourceLoader;
this.dataSource = dataSource.getIfUnique();
this.liquibaseDataSource = liquibaseDataSource.getIfAvailable();
}

@ -126,6 +126,7 @@ public class RabbitAutoConfigurationTests {
}
@Test
@SuppressWarnings("unchecked")
public void testConnectionFactoryWithOverrides() {
this.contextRunner.withUserConfiguration(TestConfiguration.class)
.withPropertyValues("spring.rabbitmq.host:remote-server", "spring.rabbitmq.port:9000",
@ -143,6 +144,7 @@ public class RabbitAutoConfigurationTests {
}
@Test
@SuppressWarnings("unchecked")
public void testConnectionFactoryWithCustomConnectionNameStrategy() {
this.contextRunner.withUserConfiguration(ConnectionNameStrategyConfiguration.class).run((context) -> {
CachingConnectionFactory connectionFactory = context.getBean(CachingConnectionFactory.class);

@ -24,6 +24,7 @@ import org.springframework.stereotype.Component;
* @author Madhura Bhave
*/
@Component
@SuppressWarnings("rawtypes")
public class SimpleFactoryBean implements FactoryBean {
private static boolean isInitializedEarly = false;
@ -40,10 +41,12 @@ public class SimpleFactoryBean implements FactoryBean {
}
}
@Override
public Object getObject() {
return new Object();
}
@Override
public Class<?> getObjectType() {
return Object.class;
}

@ -22,6 +22,7 @@ import java.util.Map;
/**
* A pojo with a complex generic signature.
*
* @param <T> the generic type
* @author Stephane Nicoll
*/
public class UpperBoundGenericPojo<T extends Enum<T>> {

@ -58,13 +58,13 @@ public class CompressionConnectorCustomizerTests {
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
connector.addUpgradeProtocol(new Http2Protocol());
compressionConnectorCustomizer.customize(connector);
AbstractHttp11Protocol abstractHttp11Protocol = (AbstractHttp11Protocol) connector.getProtocolHandler();
AbstractHttp11Protocol<?> abstractHttp11Protocol = (AbstractHttp11Protocol<?>) connector.getProtocolHandler();
verifyHttp1(abstractHttp11Protocol);
Http2Protocol http2Protocol = (Http2Protocol) connector.findUpgradeProtocols()[0];
verifyHttp2Upgrade(http2Protocol);
}
private void verifyHttp1(AbstractHttp11Protocol protocol) {
private void verifyHttp1(AbstractHttp11Protocol<?> protocol) {
compressionOn(protocol.getCompression());
minSize(protocol.getCompressionMinSize());
mimeType(protocol.getCompressibleMimeTypes());

Loading…
Cancel
Save