CacheFactoryBean is no longer an initializing bean to address lifecycle issues with client cache and pool
This commit is contained in:
@@ -27,6 +27,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import com.gemstone.gemfire.cache.Cache;
|
||||
|
||||
|
||||
/**
|
||||
* Integration test for declarable support (and GEF bean factory locator).
|
||||
@@ -42,6 +44,7 @@ public class DeclarableSupportTest {
|
||||
|
||||
@Test
|
||||
public void testUserObject() throws Exception {
|
||||
ctx.getBean(Cache.class);
|
||||
assertNotNull(UserObject.THIS);
|
||||
UserObject obj = UserObject.THIS;
|
||||
assertSame(ctx, obj.getBeanFactory());
|
||||
|
||||
@@ -47,7 +47,6 @@ public class SubRegionTest extends RecreatingContextTest {
|
||||
CacheFactoryBean cfb = new CacheFactoryBean();
|
||||
cfb.setBeanName("gemfireCache");
|
||||
cfb.setUseBeanFactoryLocator(false);
|
||||
cfb.afterPropertiesSet();
|
||||
GemFireCache cache = cfb.getObject();
|
||||
RegionFactoryBean rfb = new ReplicatedRegionFactoryBean();
|
||||
rfb.setCache(cache);
|
||||
|
||||
@@ -69,7 +69,7 @@ public class FunctionExecutionClientCacheTests {
|
||||
@ImportResource("/org/springframework/data/gemfire/function/config/FunctionExecutionCacheClientTests-context.xml")
|
||||
@EnableGemfireFunctionExecutions (basePackages = "org.springframework.data.gemfire.function.config.three",
|
||||
excludeFilters = {
|
||||
@ComponentScan.Filter(type=FilterType.ANNOTATION, value=OnRegion.class)/*,
|
||||
/*@ComponentScan.Filter(type=FilterType.ANNOTATION, value=OnRegion.class),
|
||||
@ComponentScan.Filter(type=FilterType.ANNOTATION, value=OnServer.class)*/
|
||||
}
|
||||
)
|
||||
|
||||
@@ -15,8 +15,6 @@ package org.springframework.data.gemfire.function.config;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertSame;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -24,7 +22,6 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
import org.springframework.data.gemfire.TestUtils;
|
||||
import org.springframework.data.gemfire.function.config.EnableGemfireFunctionExecutions;
|
||||
import org.springframework.data.gemfire.function.config.two.TestOnRegionFunction;
|
||||
import org.springframework.data.gemfire.function.execution.GemfireOnRegionFunctionTemplate;
|
||||
import org.springframework.data.gemfire.function.execution.OnRegionFunctionProxyFactoryBean;
|
||||
@@ -32,8 +29,6 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import com.gemstone.gemfire.cache.Region;
|
||||
import com.gemstone.gemfire.cache.client.ClientCache;
|
||||
import com.gemstone.gemfire.cache.client.Pool;
|
||||
|
||||
/**
|
||||
* @author David Turanski
|
||||
|
||||
@@ -49,7 +49,6 @@ public class GemfireRepositoriesRegistrarIntegrationTest {
|
||||
public GemFireCache cache() throws Exception {
|
||||
|
||||
CacheFactoryBean factory = new CacheFactoryBean();
|
||||
factory.afterPropertiesSet();
|
||||
return factory.getObject();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ public abstract class AbstractRegionFactoryBeanTest {
|
||||
CacheFactoryBean cfb = new CacheFactoryBean();
|
||||
cfb.setBeanName("gemfireCache");
|
||||
cfb.setUseBeanFactoryLocator(false);
|
||||
cfb.afterPropertiesSet();
|
||||
cache = cfb.getObject();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user