diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/TestCacheListenerLogger.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/TestCacheListenerLogger.java index 9d2690d797..5043ec4a89 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/TestCacheListenerLogger.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/TestCacheListenerLogger.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,10 +16,10 @@ package org.springframework.integration.gemfire; -import org.apache.geode.cache.EntryEvent; -import org.apache.geode.cache.util.CacheListenerAdapter; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.geode.cache.EntryEvent; +import org.apache.geode.cache.util.CacheListenerAdapter; /** * (this is the CacheLogger class that ships in the Spring-Gemfire samples) 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 7cbe00af22..2dfb87df29 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 @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.mockito.Mockito.mock; +import org.apache.geode.cache.Region; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -33,8 +34,6 @@ import org.springframework.expression.spel.standard.SpelExpressionParser; import org.springframework.integration.channel.QueueChannel; import org.springframework.messaging.Message; -import org.apache.geode.cache.Region; - /** * @author Mark Fisher * @author Gary Russell @@ -55,7 +54,9 @@ public class CacheListeningMessageProducerTests { public static void setup() throws Exception { cacheFactoryBean = new CacheFactoryBean(); - regionFactoryBean = new RegionFactoryBean() { }; + regionFactoryBean = new RegionFactoryBean() { + + }; regionFactoryBean.setName("test.receiveNewValuePayloadForCreateEvent"); regionFactoryBean.setCache(cacheFactoryBean.getObject()); setRegionAttributes(regionFactoryBean); diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/ContinuousQueryMessageProducerTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/ContinuousQueryMessageProducerTests.java index 2bad709124..d21cbd6581 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/ContinuousQueryMessageProducerTests.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/ContinuousQueryMessageProducerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import org.apache.geode.cache.query.CqQuery; import org.apache.geode.cache.query.internal.cq.ServerCQImpl; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.BeanFactory; import org.springframework.data.gemfire.listener.ContinuousQueryListenerContainer; import org.springframework.expression.spel.standard.SpelExpressionParser; 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 9d8440cde9..99a2b76290 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 @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,9 +23,10 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import java.io.OutputStream; +import org.apache.geode.cache.query.CqEvent; +import org.apache.geode.internal.cache.LocalRegion; import org.junit.AfterClass; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -39,9 +40,6 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.apache.geode.cache.query.CqEvent; -import org.apache.geode.internal.cache.LocalRegion; - /** * @author David Turanski * @author Gary Russell @@ -76,8 +74,7 @@ public class CqInboundChannelAdapterTests { } @Test - @Ignore("Until INT-4211") - public void testCqEvent() throws InterruptedException { + public void testCqEvent() throws InterruptedException { assertTrue(TestUtils.getPropertyValue(withDurable, "durable", Boolean.class)); region.put("one", 1); Message msg = outputChannel1.receive(10000); @@ -86,8 +83,7 @@ public class CqInboundChannelAdapterTests { } @Test - @Ignore("Until INT-4211") - public void testPayloadExpression() throws InterruptedException { + public void testPayloadExpression() throws InterruptedException { region.put("one", 1); Message msg = outputChannel2.receive(10000); assertNotNull(msg); @@ -95,7 +91,7 @@ public class CqInboundChannelAdapterTests { } @AfterClass - public static void cleanUp() { + public static void cleanUp() { sendSignal(); } diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/GemfireInboundChannelAdapterTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/GemfireInboundChannelAdapterTests.java index 7c9f85a758..a8cd1bdace 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/GemfireInboundChannelAdapterTests.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/inbound/GemfireInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,8 @@ package org.springframework.integration.gemfire.inbound; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import org.junit.Ignore; +import org.apache.geode.cache.EntryEvent; +import org.apache.geode.internal.cache.LocalRegion; import org.junit.Test; import org.junit.runner.RunWith; @@ -33,9 +34,6 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.apache.geode.cache.EntryEvent; -import org.apache.geode.internal.cache.LocalRegion; - /** * @author David Turanski * @since 2.1 @@ -67,7 +65,6 @@ public class GemfireInboundChannelAdapterTests { LocalRegion region3; @Test - @Ignore("Until INT-4211") public void testGemfireInboundChannelAdapterWithExpression() { EventHandler eventHandler1 = new EventHandler(); @@ -79,7 +76,6 @@ public class GemfireInboundChannelAdapterTests { } @Test - @Ignore("Until INT-4211") public void testGemfireInboundChannelAdapterDefault() { EventHandler eventHandler2 = new EventHandler(); channel2.subscribe(eventHandler2); @@ -92,7 +88,6 @@ public class GemfireInboundChannelAdapterTests { } @Test - @Ignore("Until INT-4211") public void testErrorChannel() { channel3.subscribe(message -> { throw new MessagingException("got an error"); diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/metadata/GemfireMetadataStoreTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/metadata/GemfireMetadataStoreTests.java index b9568c1f67..b48ba28e5b 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/metadata/GemfireMetadataStoreTests.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/metadata/GemfireMetadataStoreTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; +import org.apache.geode.cache.Cache; +import org.apache.geode.cache.CacheFactory; +import org.apache.geode.cache.Region; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -30,10 +33,6 @@ import org.springframework.data.gemfire.GemfireTemplate; import org.springframework.integration.metadata.ConcurrentMetadataStore; import org.springframework.util.Assert; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.CacheFactory; -import org.apache.geode.cache.Region; - /** * @author Artem Bilan * @since 4.0 diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/CacheWritingMessageHandlerTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/CacheWritingMessageHandlerTests.java index e1a8ebf2de..918b06180f 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/CacheWritingMessageHandlerTests.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/CacheWritingMessageHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,10 +23,14 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; +import org.apache.geode.cache.Cache; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.Scope; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; + import org.springframework.beans.factory.BeanFactory; import org.springframework.data.gemfire.CacheFactoryBean; import org.springframework.expression.Expression; @@ -36,10 +40,6 @@ import org.springframework.integration.support.MessageBuilder; import org.springframework.messaging.Message; import org.springframework.messaging.support.GenericMessage; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.Scope; - /** * @author Mark Fisher * @author David Turanski diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/GemfireOutboundChannelAdapterTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/GemfireOutboundChannelAdapterTests.java index 8deb29db53..34794e494f 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/GemfireOutboundChannelAdapterTests.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/GemfireOutboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,21 +21,19 @@ import static org.junit.Assert.assertEquals; import java.util.HashMap; import java.util.Map; +import org.apache.geode.internal.cache.DistributedRegion; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.integration.support.MessageBuilder; import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; -import org.springframework.integration.support.MessageBuilder; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.apache.geode.internal.cache.DistributedRegion; - /** * @author David Turanski * @author Artem Bilan @@ -70,7 +68,6 @@ public class GemfireOutboundChannelAdapterTests { } @Test - @Ignore("Until INT-4211") public void testWriteMapPayload() { Map map = new HashMap(); map.put("foo", "bar"); @@ -82,7 +79,6 @@ public class GemfireOutboundChannelAdapterTests { } @Test - @Ignore("Until INT-4211") public void testWriteExpressions() { Message message = MessageBuilder.withPayload("Hello").build(); cacheChannel2.send(message); @@ -92,7 +88,6 @@ public class GemfireOutboundChannelAdapterTests { } @Test //INT-2275 - @Ignore("Until INT-4211") public void testWriteWithinChain() { Map map = new HashMap(); map.put("foo", "bar"); diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/store/GemfireGroupStoreTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/store/GemfireGroupStoreTests.java index 83716d258b..d066ac82e1 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/store/GemfireGroupStoreTests.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/store/GemfireGroupStoreTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2007-2016 the original author or authors. + * Copyright 2007-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,9 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; +import org.apache.geode.cache.Cache; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.Scope; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -48,10 +51,6 @@ import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.support.GenericMessage; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.Scope; - import junit.framework.AssertionFailedError; /** diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/store/GemfireMessageStoreTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/store/GemfireMessageStoreTests.java index 1a3e3fcc3f..5972e0f646 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/store/GemfireMessageStoreTests.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/store/GemfireMessageStoreTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,9 @@ import java.util.ArrayList; import java.util.List; import java.util.Properties; +import org.apache.geode.cache.Cache; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.Scope; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -39,10 +42,6 @@ import org.springframework.integration.test.util.TestUtils; import org.springframework.messaging.Message; import org.springframework.messaging.support.GenericMessage; -import org.apache.geode.cache.Cache; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.Scope; - /** * @author Mark Fisher * @author David Turanski @@ -69,7 +68,9 @@ public class GemfireMessageStoreTests { @Test public void testRegionConstructor() throws Exception { - RegionFactoryBean region = new RegionFactoryBean() { }; + RegionFactoryBean region = new RegionFactoryBean() { + + }; region.setName("someRegion"); region.setCache(cacheFactoryBean.getObject()); region.afterPropertiesSet(); diff --git a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/util/AggregatorWithGemfireLocksTests.java b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/util/AggregatorWithGemfireLocksTests.java index 6d92ebdf80..f6e3897d88 100644 --- a/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/util/AggregatorWithGemfireLocksTests.java +++ b/spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/util/AggregatorWithGemfireLocksTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -69,7 +68,6 @@ public class AggregatorWithGemfireLocksTests { private volatile Exception exception; @Test - @Ignore("Until INT-4211") public void testLockSingleGroup() throws Exception { this.releaseStrategy.reset(1); Executors.newSingleThreadExecutor().execute(asyncSend("foo", 1, 1)); @@ -82,7 +80,6 @@ public class AggregatorWithGemfireLocksTests { } @Test - @Ignore("Until INT-4211") public void testLockThreeGroups() throws Exception { this.releaseStrategy.reset(3); Executors.newSingleThreadExecutor().execute(asyncSend("foo", 1, 1)); @@ -103,7 +100,6 @@ public class AggregatorWithGemfireLocksTests { } @Test - @Ignore("Until INT-4211") public void testDistributedAggregator() throws Exception { this.releaseStrategy.reset(1); Executors.newSingleThreadExecutor().execute(asyncSend("foo", 1, 1)); @@ -112,7 +108,6 @@ public class AggregatorWithGemfireLocksTests { in2.send(new GenericMessage("bar", stubHeaders(2, 2, 1))); } catch (Exception e) { - e.printStackTrace(); exception = e; } }); @@ -129,7 +124,6 @@ public class AggregatorWithGemfireLocksTests { in.send(new GenericMessage(payload, stubHeaders(sequence, 2, correlation))); } catch (Exception e) { - e.printStackTrace(); exception = e; } };