diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultITest.java index 5d87a422..7a176572 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultITest.java @@ -32,6 +32,8 @@ import org.springframework.ldap.query.SearchScope; import org.springframework.ldap.support.LdapUtils; import org.springframework.ldap.test.AttributeCheckAttributesMapper; import org.springframework.ldap.test.AttributeCheckContextMapper; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.annotation.DirtiesContext.ClassMode; import org.springframework.test.context.ContextConfiguration; import javax.naming.Name; @@ -53,6 +55,7 @@ import static org.springframework.ldap.query.LdapQueryBuilder.query; * @author Mattias Hellborg Arthursson */ @ContextConfiguration(locations = {"/conf/ldapTemplateTestContext.xml"}) +@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) public class LdapTemplateSearchResultITest extends AbstractLdapTemplateIntegrationTest { @Autowired diff --git a/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultNamespaceConfigITest.java b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultNamespaceConfigITest.java index 6ff0804f..3ab4424a 100644 --- a/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultNamespaceConfigITest.java +++ b/test/integration-tests/src/test/java/org/springframework/ldap/itest/LdapTemplateSearchResultNamespaceConfigITest.java @@ -30,6 +30,8 @@ import org.springframework.ldap.query.SearchScope; import org.springframework.ldap.support.LdapUtils; import org.springframework.ldap.test.AttributeCheckAttributesMapper; import org.springframework.ldap.test.AttributeCheckContextMapper; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.annotation.DirtiesContext.ClassMode; import org.springframework.test.context.ContextConfiguration; import javax.naming.Name; @@ -50,6 +52,7 @@ import static org.springframework.ldap.query.LdapQueryBuilder.query; * @author Mattias Hellborg Arthursson */ @ContextConfiguration(locations = {"/conf/ldapTemplateNamespaceTestContext.xml"}) +@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) public class LdapTemplateSearchResultNamespaceConfigITest extends AbstractLdapTemplateIntegrationTest { @Autowired