From 71c93615d9de9179a8893414aa09bfd0b8dde5ef Mon Sep 17 00:00:00 2001 From: John Blum Date: Sun, 28 Apr 2019 17:50:59 -0700 Subject: [PATCH] Refactor test class setup and tearDown. Remove GemfireBeanFactoryLocator cleanup. Rely on IntegrationTestsSupport to cleanup the GemfireBeanFactoryLocator state. Rename setup/tearDown method from cleanUpBeanFactoryLocatorReferences to cleanupSecurityManagerProxyInstance. --- .../support/SecurityManagerProxyIntegrationTests.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/spring-geode/src/test/java/org/springframework/geode/security/support/SecurityManagerProxyIntegrationTests.java b/spring-geode/src/test/java/org/springframework/geode/security/support/SecurityManagerProxyIntegrationTests.java index b469590c..d6558088 100644 --- a/spring-geode/src/test/java/org/springframework/geode/security/support/SecurityManagerProxyIntegrationTests.java +++ b/spring-geode/src/test/java/org/springframework/geode/security/support/SecurityManagerProxyIntegrationTests.java @@ -13,7 +13,6 @@ * or implied. See the License for the specific language governing * permissions and limitations under the License. */ - package org.springframework.geode.security.support; import static org.assertj.core.api.Assertions.assertThat; @@ -28,7 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.data.gemfire.config.annotation.EnableSecurity; import org.springframework.data.gemfire.config.annotation.PeerCacheApplication; -import org.springframework.data.gemfire.support.GemfireBeanFactoryLocator; import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport; import org.springframework.data.gemfire.tests.mock.annotation.EnableGemFireMockObjects; import org.springframework.geode.core.util.ObjectUtils; @@ -62,9 +60,7 @@ public class SecurityManagerProxyIntegrationTests extends IntegrationTestsSuppor @BeforeClass @AfterClass - public static void cleanUpBeanFactoryLocatorReferences() throws Exception { - - GemfireBeanFactoryLocator.clear(); + public static void cleanupSecurityManagerProxyInstance() { ObjectUtils.doOperationSafely(() -> { SecurityManagerProxy.getInstance().destroy();