INT-4211: Un@Ignore Gemfire tests
JIRA: https://jira.spring.io/browse/INT-4211 The latest Spring Data Gemfire fixed `BeanFactoryLocator` issue. * Now we can remove `@Ignore` from tests which have failed before by the `ClassNotFaoud` reason * Also fix Checkstyle violations in the Gemfire module classes
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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<String, String>() { };
|
||||
regionFactoryBean = new RegionFactoryBean<String, String>() {
|
||||
|
||||
};
|
||||
regionFactoryBean.setName("test.receiveNewValuePayloadForCreateEvent");
|
||||
regionFactoryBean.setCache(cacheFactoryBean.getObject());
|
||||
setRegionAttributes(regionFactoryBean);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<String, String> map = new HashMap<String, String>();
|
||||
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<String, String> map = new HashMap<String, String>();
|
||||
map.put("foo", "bar");
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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<Object, Object> region = new RegionFactoryBean<Object, Object>() { };
|
||||
RegionFactoryBean<Object, Object> region = new RegionFactoryBean<Object, Object>() {
|
||||
|
||||
};
|
||||
region.setName("someRegion");
|
||||
region.setCache(cacheFactoryBean.getObject());
|
||||
region.afterPropertiesSet();
|
||||
|
||||
@@ -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<String>("bar", stubHeaders(2, 2, 1)));
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
exception = e;
|
||||
}
|
||||
});
|
||||
@@ -129,7 +124,6 @@ public class AggregatorWithGemfireLocksTests {
|
||||
in.send(new GenericMessage<String>(payload, stubHeaders(sequence, 2, correlation)));
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
exception = e;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user