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:
John Blum
2020-04-15 23:56:37 -07:00
parent eb056bc9c4
commit f47f9f55b7
2 changed files with 4 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Profile;
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
import org.springframework.geode.boot.autoconfigure.EnvironmentSourcedGemFirePropertiesAutoConfiguration;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
@@ -49,6 +50,7 @@ import org.springframework.test.context.junit4.SpringRunner;
* @since 1.3.0
*/
@ActiveProfiles("application-gemfire-properties")
@DirtiesContext
@RunWith(SpringRunner.class)
@SpringBootTest(properties = {
"gemfire.distributed-system-id=123",

View File

@@ -30,6 +30,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Profile;
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
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.junit4.SpringRunner;
@@ -52,6 +53,7 @@ import org.springframework.test.context.junit4.SpringRunner;
* @since 1.3.0
*/
@ActiveProfiles("spring-gemfire-property-precedence")
@DirtiesContext
@RunWith(SpringRunner.class)
@SpringBootTest(properties = {
"spring.data.gemfire.cache.client.durable-client-id=987",