Skip to content

Commit 90136d7

Browse files
committed
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**
1 parent 5a498e0 commit 90136d7

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/GemfireInboundChannelAdapterTests-context.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
http://www.springframework.org/schema/beans
1111
http://www.springframework.org/schema/beans/spring-beans.xsd">
1212

13-
<gfe:cache id="gemfire-cache-2"/>
13+
<gfe:cache id="gemfire-cache-2" use-bean-factory-locator="false"/>
1414

1515
<gfe:local-region id="region1" cache-ref="gemfire-cache-2"/>
1616

spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/GemfireInboundChannelAdapterTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.springframework.messaging.MessagingException;
2525
import org.springframework.messaging.SubscribableChannel;
2626
import org.springframework.messaging.support.ErrorMessage;
27+
import org.springframework.test.annotation.DirtiesContext;
2728
import org.springframework.test.context.ContextConfiguration;
2829
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
2930

@@ -36,6 +37,7 @@
3637
*/
3738
@RunWith(SpringJUnit4ClassRunner.class)
3839
@ContextConfiguration
40+
@DirtiesContext
3941
public class GemfireInboundChannelAdapterTests {
4042
@Autowired
4143
SubscribableChannel channel1;

spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/GemfireOutboundChannelAdapterTests-context.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
1010
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
1111

12-
<gfe:cache />
12+
<gfe:cache use-bean-factory-locator="false"/>
1313

1414
<gfe:replicated-region id="region1"/>
1515

spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/util/AggregatorWithGemfireLocksTests-context.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
88
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd">
99

10-
<gfe:cache />
10+
<gfe:cache use-bean-factory-locator="false"/>
1111

1212
<bean id="lockRegistry" class="org.springframework.integration.gemfire.util.GemfireLockRegistry">
1313
<constructor-arg ref="gemfireCache"/>

0 commit comments

Comments
 (0)