Turn off beanFactoryReference for Gemfire Caches
Looks like there is some race condition around static fields in the `GemfireBeanFactoryLocator` Also add `@DirtiesContext` to the `GemfireInboundChannelAdapterTests` **Cherry-pick to 4.3.x and master**
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<gfe:cache id="gemfire-cache-2"/>
|
||||
<gfe:cache id="gemfire-cache-2" use-bean-factory-locator="false"/>
|
||||
|
||||
<gfe:local-region id="region1" cache-ref="gemfire-cache-2"/>
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
import org.springframework.messaging.support.ErrorMessage;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@@ -36,6 +37,7 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration
|
||||
@DirtiesContext
|
||||
public class GemfireInboundChannelAdapterTests {
|
||||
@Autowired
|
||||
SubscribableChannel channel1;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<gfe:cache />
|
||||
<gfe:cache use-bean-factory-locator="false"/>
|
||||
|
||||
<gfe:replicated-region id="region1"/>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
|
||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd">
|
||||
|
||||
<gfe:cache />
|
||||
<gfe:cache use-bean-factory-locator="false"/>
|
||||
|
||||
<bean id="lockRegistry" class="org.springframework.integration.gemfire.util.GemfireLockRegistry">
|
||||
<constructor-arg ref="gemfireCache"/>
|
||||
|
||||
Reference in New Issue
Block a user