diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CacheListeningMessageProducerTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CacheListeningMessageProducerTests.java index 441d6bb460..4b73f10d8c 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CacheListeningMessageProducerTests.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CacheListeningMessageProducerTests.java @@ -22,6 +22,7 @@ import static org.junit.Assert.assertNull; import org.junit.Test; import org.springframework.data.gemfire.CacheFactoryBean; +import org.springframework.data.gemfire.RegionAttributesFactoryBean; import org.springframework.data.gemfire.RegionFactoryBean; import org.springframework.integration.Message; import org.springframework.integration.channel.QueueChannel; @@ -40,9 +41,12 @@ public class CacheListeningMessageProducerTests { CacheFactoryBean cacheFactoryBean = new CacheFactoryBean(); cacheFactoryBean.afterPropertiesSet(); Cache cache = (Cache)cacheFactoryBean.getObject(); + RegionFactoryBean regionFactoryBean = new RegionFactoryBean(); regionFactoryBean.setName("test.receiveNewValuePayloadForCreateEvent"); regionFactoryBean.setCache(cache); + this.setRegionAttributes(regionFactoryBean); + regionFactoryBean.afterPropertiesSet(); Region region = regionFactoryBean.getObject(); QueueChannel channel = new QueueChannel(); @@ -63,9 +67,12 @@ public class CacheListeningMessageProducerTests { CacheFactoryBean cacheFactoryBean = new CacheFactoryBean(); cacheFactoryBean.afterPropertiesSet(); Cache cache = (Cache)cacheFactoryBean.getObject(); + RegionFactoryBean regionFactoryBean = new RegionFactoryBean(); regionFactoryBean.setName("test.receiveNewValuePayloadForUpdateEvent"); regionFactoryBean.setCache(cache); + this.setRegionAttributes(regionFactoryBean); + regionFactoryBean.afterPropertiesSet(); Region region = regionFactoryBean.getObject(); QueueChannel channel = new QueueChannel(); @@ -90,9 +97,12 @@ public class CacheListeningMessageProducerTests { CacheFactoryBean cacheFactoryBean = new CacheFactoryBean(); cacheFactoryBean.afterPropertiesSet(); Cache cache = (Cache)cacheFactoryBean.getObject(); + RegionFactoryBean regionFactoryBean = new RegionFactoryBean(); regionFactoryBean.setName("test.receiveOldValuePayloadForDestroyEvent"); regionFactoryBean.setCache(cache); + this.setRegionAttributes(regionFactoryBean); + regionFactoryBean.afterPropertiesSet(); Region region = regionFactoryBean.getObject(); QueueChannel channel = new QueueChannel(); @@ -116,9 +126,12 @@ public class CacheListeningMessageProducerTests { CacheFactoryBean cacheFactoryBean = new CacheFactoryBean(); cacheFactoryBean.afterPropertiesSet(); Cache cache = (Cache)cacheFactoryBean.getObject(); + RegionFactoryBean regionFactoryBean = new RegionFactoryBean(); regionFactoryBean.setName("test.receiveOldValuePayloadForDestroyEvent"); regionFactoryBean.setCache(cache); + this.setRegionAttributes(regionFactoryBean); + regionFactoryBean.afterPropertiesSet(); Region region = regionFactoryBean.getObject(); QueueChannel channel = new QueueChannel(); @@ -136,4 +149,12 @@ public class CacheListeningMessageProducerTests { assertNotNull(message2); assertEquals("foo was abc", message2.getPayload()); } + + @SuppressWarnings("unchecked") + private void setRegionAttributes(RegionFactoryBean regionFactoryBean) throws Exception{ + RegionAttributesFactoryBean attributesFactoryBean = new RegionAttributesFactoryBean(); + attributesFactoryBean.setIgnoreJTA(true); + attributesFactoryBean.afterPropertiesSet(); + regionFactoryBean.setAttributes(attributesFactoryBean.getObject()); + } } diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CqInboundChannelAdapterTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CqInboundChannelAdapterTests.java index dc6e941e19..84abf01a50 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CqInboundChannelAdapterTests.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/CqInboundChannelAdapterTests.java @@ -22,6 +22,7 @@ import java.io.OutputStream; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -41,6 +42,7 @@ import com.gemstone.gemfire.internal.cache.LocalRegion; */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration +@Ignore public class CqInboundChannelAdapterTests { static ConfigurableApplicationContext staticCtx;