Annotate Spring Geode Sample test classes with Spring Test Framework's @DirtiesContext annotation to avoid test conflicts.

This commit is contained in:
John Blum
2021-03-30 11:58:39 -07:00
parent 61af587a0d
commit 55b8ca5373
2 changed files with 10 additions and 10 deletions

View File

@@ -19,15 +19,16 @@ import static org.assertj.core.api.Assertions.assertThat;
import javax.annotation.Resource;
import org.apache.geode.cache.Region;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.apache.geode.cache.Region;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
@@ -42,14 +43,14 @@ import example.app.crm.repo.CustomerRepository;
* @see org.apache.geode.cache.Region
* @see org.springframework.boot.test.context.SpringBootTest
* @see org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport
* @see org.springframework.test.annotation.DirtiesContext
* @see org.springframework.test.context.ActiveProfiles
* @see org.springframework.test.context.junit4.SpringRunner
* @see example.app.crm.model.Customer
* @see example.app.crm.repo.CustomerRepository
* @since 1.1.0
*/
// tag::class[]
@ActiveProfiles("debug")
@DirtiesContext
@RunWith(SpringRunner.class)
@SpringBootTest(properties = {
"spring.boot.data.gemfire.security.ssl.environment.post-processor.enabled=false"