mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Disable test context cache in spring-boot-testcontainers
Closes gh-41124
This commit is contained in:
parent
03a87ccd69
commit
138307c13c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
|
@ -27,7 +27,6 @@ import org.springframework.boot.testsupport.testcontainers.DisabledIfDockerUnava
|
|||
import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
@ -42,7 +41,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
@ExtendWith(SpringExtension.class)
|
||||
@ContextConfiguration(classes = ContainerConfig.class)
|
||||
@TestPropertySource(properties = "spring.testcontainers.beans.startup=parallel")
|
||||
@DirtiesContext
|
||||
@DisabledIfDockerUnavailable
|
||||
@ExtendWith(OutputCaptureExtension.class)
|
||||
public class TestContainersParallelStartupIntegrationTests {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
|
@ -27,7 +27,6 @@ import org.springframework.boot.testcontainers.context.ImportTestcontainers;
|
|||
import org.springframework.boot.testcontainers.lifecycle.TestContainersParallelStartupWithImportTestcontainersIntegrationTests.Containers;
|
||||
import org.springframework.boot.testsupport.testcontainers.DisabledIfDockerUnavailable;
|
||||
import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
|
@ -40,7 +39,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@TestPropertySource(properties = "spring.testcontainers.beans.startup=parallel")
|
||||
@DirtiesContext
|
||||
@DisabledIfDockerUnavailable
|
||||
@ExtendWith(OutputCaptureExtension.class)
|
||||
@ImportTestcontainers(Containers.class)
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
|
|||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.weaving.LoadTimeWeaverAware;
|
||||
import org.springframework.instrument.classloading.LoadTimeWeaver;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.DynamicPropertyRegistry;
|
||||
import org.springframework.test.context.DynamicPropertySource;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
@ -40,7 +39,6 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
|
|||
* @author Phillip Webb
|
||||
*/
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@DirtiesContext
|
||||
@DisabledIfDockerUnavailable
|
||||
@ImportTestcontainers(Containers.class)
|
||||
class TestcontainersImportWithPropertiesInjectedIntoLoadTimeWeaverAwareBeanIntegrationTests {
|
||||
|
|
|
@ -40,7 +40,6 @@ import org.springframework.boot.testcontainers.service.connection.ServiceConnect
|
|||
import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
|
||||
|
@ -58,7 +57,6 @@ import static org.hamcrest.Matchers.matchesPattern;
|
|||
@TestPropertySource(properties = { "management.otlp.metrics.export.resource-attributes.service.name=test",
|
||||
"management.otlp.metrics.export.step=1s" })
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
@DirtiesContext
|
||||
class OpenTelemetryMetricsContainerConnectionDetailsFactoryIntegrationTests {
|
||||
|
||||
private static final String OPENMETRICS_001 = "application/openmetrics-text; version=0.0.1; charset=utf-8";
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
spring.test.context.cache.maxSize=1
|
Loading…
Reference in New Issue
Block a user