Annotate test class with @DirtiesContext.
Geode Properties defined in the Spring ApplicationContext using the @SpringBootTest annotation is running interference with downstream Integration Tests.
This commit is contained in:
@@ -30,6 +30,7 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|||||||
import org.springframework.context.annotation.Profile;
|
import org.springframework.context.annotation.Profile;
|
||||||
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
|
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
|
||||||
import org.springframework.geode.boot.autoconfigure.EnvironmentSourcedGemFirePropertiesAutoConfiguration;
|
import org.springframework.geode.boot.autoconfigure.EnvironmentSourcedGemFirePropertiesAutoConfiguration;
|
||||||
|
import org.springframework.test.annotation.DirtiesContext;
|
||||||
import org.springframework.test.context.ActiveProfiles;
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
@@ -49,6 +50,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
|||||||
* @since 1.3.0
|
* @since 1.3.0
|
||||||
*/
|
*/
|
||||||
@ActiveProfiles("application-gemfire-properties")
|
@ActiveProfiles("application-gemfire-properties")
|
||||||
|
@DirtiesContext
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(properties = {
|
@SpringBootTest(properties = {
|
||||||
"gemfire.distributed-system-id=123",
|
"gemfire.distributed-system-id=123",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|||||||
import org.springframework.context.annotation.Profile;
|
import org.springframework.context.annotation.Profile;
|
||||||
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
|
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
|
||||||
import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects;
|
import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects;
|
||||||
|
import org.springframework.test.annotation.DirtiesContext;
|
||||||
import org.springframework.test.context.ActiveProfiles;
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
@@ -52,6 +53,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
|||||||
* @since 1.3.0
|
* @since 1.3.0
|
||||||
*/
|
*/
|
||||||
@ActiveProfiles("spring-gemfire-property-precedence")
|
@ActiveProfiles("spring-gemfire-property-precedence")
|
||||||
|
@DirtiesContext
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(properties = {
|
@SpringBootTest(properties = {
|
||||||
"spring.data.gemfire.cache.client.durable-client-id=987",
|
"spring.data.gemfire.cache.client.durable-client-id=987",
|
||||||
|
|||||||
Reference in New Issue
Block a user