checkstyle WhiteAround
WhiteAroundCheck script
This commit is contained in:
@@ -83,7 +83,7 @@ public class SubscribableRedisChannelTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void dispatcherHasNoSubscribersTest() throws Exception{
|
||||
public void dispatcherHasNoSubscribersTest() throws Exception {
|
||||
RedisConnectionFactory connectionFactory = this.getConnectionFactoryForTest();
|
||||
|
||||
SubscribableRedisChannel channel = new SubscribableRedisChannel(connectionFactory, "si.test.channel.no.subs");
|
||||
|
||||
@@ -49,7 +49,7 @@ public class RedisChannelParserTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testPubSubChannelConfig(){
|
||||
public void testPubSubChannelConfig() {
|
||||
ClassPathXmlApplicationContext context =
|
||||
new ClassPathXmlApplicationContext("RedisChannelParserTests-context.xml", this.getClass());
|
||||
SubscribableChannel redisChannel = context.getBean("redisChannel", SubscribableChannel.class);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -90,7 +90,7 @@ public class RedisOutboundChannelAdapterParserTests extends RedisAvailableTests
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testOutboundChannelAdapterMessaging() throws Exception{
|
||||
public void testOutboundChannelAdapterMessaging() throws Exception {
|
||||
MessageChannel sendChannel = context.getBean("sendChannel", MessageChannel.class);
|
||||
this.awaitContainerSubscribed(TestUtils.getPropertyValue(fooInbound, "container",
|
||||
RedisMessageListenerContainer.class));
|
||||
@@ -110,7 +110,7 @@ public class RedisOutboundChannelAdapterParserTests extends RedisAvailableTests
|
||||
|
||||
@Test //INT-2275
|
||||
@RedisAvailable
|
||||
public void testOutboundChannelAdapterWithinChain() throws Exception{
|
||||
public void testOutboundChannelAdapterWithinChain() throws Exception {
|
||||
MessageChannel sendChannel = context.getBean("redisOutboudChain", MessageChannel.class);
|
||||
this.awaitContainerSubscribed(TestUtils.getPropertyValue(fooInbound, "container",
|
||||
RedisMessageListenerContainer.class));
|
||||
|
||||
@@ -92,7 +92,7 @@ public class RedisQueueGatewayIntegrationTests extends RedisAvailableTests {
|
||||
try {
|
||||
this.sendChannel.send(new GenericMessage<String>("test1"));
|
||||
}
|
||||
catch(Exception e) {
|
||||
catch (Exception e) {
|
||||
assertTrue(e.getMessage().contains("No reply produced"));
|
||||
}
|
||||
finally {
|
||||
@@ -108,7 +108,7 @@ public class RedisQueueGatewayIntegrationTests extends RedisAvailableTests {
|
||||
try {
|
||||
this.sendChannel.send(new GenericMessage<String>("test1"));
|
||||
}
|
||||
catch(Exception e) {
|
||||
catch (Exception e) {
|
||||
assertTrue(e.getMessage().contains("No reply produced"));
|
||||
}
|
||||
finally {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -51,28 +51,28 @@ public class RedisStoreInboundChannelAdapterParserTests {
|
||||
private ApplicationContext context;
|
||||
|
||||
@Autowired
|
||||
private RedisTemplate<?,?> redisTemplate;
|
||||
private RedisTemplate<?, ?> redisTemplate;
|
||||
|
||||
@Test
|
||||
public void validateWithStringTemplate(){
|
||||
public void validateWithStringTemplate() {
|
||||
RedisStoreMessageSource withStringTemplate =
|
||||
TestUtils.getPropertyValue(context.getBean("withStringTemplate"), "source", RedisStoreMessageSource.class);
|
||||
assertEquals("'presidents'", ((SpelExpression)TestUtils.getPropertyValue(withStringTemplate, "keyExpression")).getExpressionString());
|
||||
assertEquals("LIST", ((CollectionType)TestUtils.getPropertyValue(withStringTemplate, "collectionType")).toString());
|
||||
assertEquals("'presidents'", ((SpelExpression) TestUtils.getPropertyValue(withStringTemplate, "keyExpression")).getExpressionString());
|
||||
assertEquals("LIST", ((CollectionType) TestUtils.getPropertyValue(withStringTemplate, "collectionType")).toString());
|
||||
assertTrue(TestUtils.getPropertyValue(withStringTemplate, "redisTemplate") instanceof StringRedisTemplate);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void validateWithExternalTemplate(){
|
||||
public void validateWithExternalTemplate() {
|
||||
RedisStoreMessageSource withExternalTemplate =
|
||||
TestUtils.getPropertyValue(context.getBean("withExternalTemplate"), "source", RedisStoreMessageSource.class);
|
||||
assertEquals("'presidents'", ((SpelExpression)TestUtils.getPropertyValue(withExternalTemplate, "keyExpression")).getExpressionString());
|
||||
assertEquals("LIST", ((CollectionType)TestUtils.getPropertyValue(withExternalTemplate, "collectionType")).toString());
|
||||
assertEquals("'presidents'", ((SpelExpression) TestUtils.getPropertyValue(withExternalTemplate, "keyExpression")).getExpressionString());
|
||||
assertEquals("LIST", ((CollectionType) TestUtils.getPropertyValue(withExternalTemplate, "collectionType")).toString());
|
||||
assertSame(redisTemplate, TestUtils.getPropertyValue(withExternalTemplate, "redisTemplate"));
|
||||
}
|
||||
|
||||
@Test(expected=BeanDefinitionParsingException.class)
|
||||
public void testTemplateAndCfMutualExclusivity(){
|
||||
@Test(expected = BeanDefinitionParsingException.class)
|
||||
public void testTemplateAndCfMutualExclusivity() {
|
||||
new ClassPathXmlApplicationContext("inbound-template-cf-fail.xml", this.getClass()).close();
|
||||
}
|
||||
|
||||
|
||||
@@ -56,13 +56,13 @@ public class RedisStoreOutboundChannelAdapterParserTests {
|
||||
private ApplicationContext context;
|
||||
|
||||
@Autowired
|
||||
private RedisTemplate<?,?> redisTemplate;
|
||||
private RedisTemplate<?, ?> redisTemplate;
|
||||
|
||||
@Test
|
||||
public void validateWithStringTemplate() throws Exception {
|
||||
RedisStoreWritingMessageHandler withStringTemplate = context.getBean("withStringTemplate.handler",
|
||||
RedisStoreWritingMessageHandler.class);
|
||||
assertEquals("pepboys", ((LiteralExpression)TestUtils.getPropertyValue(withStringTemplate,
|
||||
assertEquals("pepboys", ((LiteralExpression) TestUtils.getPropertyValue(withStringTemplate,
|
||||
"keyExpression")).getExpressionString());
|
||||
assertEquals("PROPERTIES", (TestUtils.getPropertyValue(withStringTemplate, "collectionType")).toString());
|
||||
assertTrue(TestUtils.getPropertyValue(withStringTemplate, "redisTemplate") instanceof StringRedisTemplate);
|
||||
@@ -78,11 +78,11 @@ public class RedisStoreOutboundChannelAdapterParserTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void validateWithStringObjectTemplate(){
|
||||
public void validateWithStringObjectTemplate() {
|
||||
RedisStoreWritingMessageHandler withStringObjectTemplate =
|
||||
TestUtils.getPropertyValue(context.getBean("withStringObjectTemplate.adapter"), "handler",
|
||||
RedisStoreWritingMessageHandler.class);
|
||||
assertEquals("pepboys", ((LiteralExpression)TestUtils.getPropertyValue(withStringObjectTemplate,
|
||||
assertEquals("pepboys", ((LiteralExpression) TestUtils.getPropertyValue(withStringObjectTemplate,
|
||||
"keyExpression")).getExpressionString());
|
||||
assertEquals("PROPERTIES", (TestUtils.getPropertyValue(withStringObjectTemplate, "collectionType")).toString());
|
||||
assertFalse(TestUtils.getPropertyValue(withStringObjectTemplate, "redisTemplate") instanceof StringRedisTemplate);
|
||||
@@ -97,11 +97,11 @@ public class RedisStoreOutboundChannelAdapterParserTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void validateWithExternalTemplate(){
|
||||
public void validateWithExternalTemplate() {
|
||||
RedisStoreWritingMessageHandler withExternalTemplate =
|
||||
TestUtils.getPropertyValue(context.getBean("withExternalTemplate.adapter"), "handler",
|
||||
RedisStoreWritingMessageHandler.class);
|
||||
assertEquals("pepboys", ((LiteralExpression)TestUtils.getPropertyValue(withExternalTemplate,
|
||||
assertEquals("pepboys", ((LiteralExpression) TestUtils.getPropertyValue(withExternalTemplate,
|
||||
"keyExpression")).getExpressionString());
|
||||
assertEquals("PROPERTIES", (TestUtils.getPropertyValue(withExternalTemplate, "collectionType")).toString());
|
||||
assertSame(redisTemplate, TestUtils.getPropertyValue(withExternalTemplate, "redisTemplate"));
|
||||
|
||||
@@ -79,7 +79,7 @@ public class RedisInboundChannelAdapterTests extends RedisAvailableTests {
|
||||
int counter = 0;
|
||||
for (int i = 0; i < numToTest; i++) {
|
||||
Message<?> message = channel.receive(5000);
|
||||
if (message == null){
|
||||
if (message == null) {
|
||||
throw new RuntimeException("Failed to receive message # " + i + " iteration " + iteration);
|
||||
}
|
||||
assertNotNull(message);
|
||||
@@ -112,7 +112,7 @@ public class RedisInboundChannelAdapterTests extends RedisAvailableTests {
|
||||
counter = 0;
|
||||
for (int i = 0; i < numToTest; i++) {
|
||||
Message<?> message = channel.receive(5000);
|
||||
if (message == null){
|
||||
if (message == null) {
|
||||
throw new RuntimeException("Failed to receive message # " + i + " iteration " + iteration);
|
||||
}
|
||||
assertNotNull(message);
|
||||
|
||||
@@ -62,7 +62,7 @@ public class RedisMetadataStoreTests extends RedisAvailableTests {
|
||||
metadataStore.put("RedisMetadataStoreTests-Spring", "Integration");
|
||||
|
||||
StringRedisTemplate redisTemplate = new StringRedisTemplate(jcf);
|
||||
BoundHashOperations<String,Object,Object> ops = redisTemplate.boundHashOps("testMetadata");
|
||||
BoundHashOperations<String, Object, Object> ops = redisTemplate.boundHashOps("testMetadata");
|
||||
|
||||
assertEquals("Integration", ops.get("RedisMetadataStoreTests-Spring"));
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ import org.springframework.messaging.support.GenericMessage;
|
||||
* @author Mark Fisher
|
||||
* @author Gary Russell
|
||||
*/
|
||||
public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{
|
||||
public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
@@ -121,7 +121,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{
|
||||
}
|
||||
|
||||
@RedisAvailable
|
||||
@Test(expected=MessageHandlingException.class)
|
||||
@Test(expected = MessageHandlingException.class)
|
||||
public void testListWithListPayloadParsedAndNoKey() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
this.deleteKey(jcf, "foo");
|
||||
@@ -266,7 +266,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testZsetWithListPayloadParsedAndProvidedKeyScoreIncrementAsStringHeader() {// see INT-2775
|
||||
public void testZsetWithListPayloadParsedAndProvidedKeyScoreIncrementAsStringHeader() { // see INT-2775
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
this.deleteKey(jcf, "foo");
|
||||
String key = "foo";
|
||||
@@ -468,7 +468,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{
|
||||
this.deletePresidents(jcf);
|
||||
}
|
||||
|
||||
@Test(expected=IllegalStateException.class)
|
||||
@Test(expected = IllegalStateException.class)
|
||||
@RedisAvailable
|
||||
public void testListWithMapKeyExpression() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
@@ -481,7 +481,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{
|
||||
handler.afterPropertiesSet();
|
||||
}
|
||||
|
||||
@Test(expected=IllegalStateException.class)
|
||||
@Test(expected = IllegalStateException.class)
|
||||
@RedisAvailable
|
||||
public void testSetWithMapKeyExpression() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
@@ -495,7 +495,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{
|
||||
handler.afterPropertiesSet();
|
||||
}
|
||||
|
||||
@Test(expected=IllegalStateException.class)
|
||||
@Test(expected = IllegalStateException.class)
|
||||
@RedisAvailable
|
||||
public void testZsetWithMapKeyExpression() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
@@ -551,7 +551,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{
|
||||
this.deleteKey(jcf, "foo");
|
||||
}
|
||||
|
||||
private <K,V> RedisTemplate<K,V> initTemplate(RedisConnectionFactory rcf, RedisTemplate<K,V> redisTemplate) {
|
||||
private <K, V> RedisTemplate<K, V> initTemplate(RedisConnectionFactory rcf, RedisTemplate<K, V> redisTemplate) {
|
||||
redisTemplate.setConnectionFactory(rcf);
|
||||
redisTemplate.setKeySerializer(new StringRedisSerializer());
|
||||
redisTemplate.afterPropertiesSet();
|
||||
|
||||
@@ -112,7 +112,7 @@ public class RedisAvailableTests {
|
||||
}
|
||||
}
|
||||
|
||||
protected void prepareList(RedisConnectionFactory connectionFactory){
|
||||
protected void prepareList(RedisConnectionFactory connectionFactory) {
|
||||
|
||||
StringRedisTemplate redisTemplate = createStringRedisTemplate(connectionFactory);
|
||||
redisTemplate.delete("presidents");
|
||||
@@ -135,7 +135,7 @@ public class RedisAvailableTests {
|
||||
ops.rightPush("George Washington");
|
||||
}
|
||||
|
||||
protected void prepareZset(RedisConnectionFactory connectionFactory){
|
||||
protected void prepareZset(RedisConnectionFactory connectionFactory) {
|
||||
|
||||
StringRedisTemplate redisTemplate = createStringRedisTemplate(connectionFactory);
|
||||
|
||||
@@ -159,7 +159,7 @@ public class RedisAvailableTests {
|
||||
ops.add("George Washington", 18);
|
||||
}
|
||||
|
||||
protected void deletePresidents(RedisConnectionFactory connectionFactory){
|
||||
protected void deletePresidents(RedisConnectionFactory connectionFactory) {
|
||||
this.deleteKey(connectionFactory, "presidents");
|
||||
}
|
||||
|
||||
|
||||
@@ -138,10 +138,10 @@ public class RedisChannelMessageStoreTests extends RedisAvailableTests {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
Message<?> m = this.testChannel3.receive(0);
|
||||
assertNotNull(m);
|
||||
assertEquals(Integer.valueOf(9-i), new IntegrationMessageHeaderAccessor(m).getPriority());
|
||||
assertEquals(Integer.valueOf(9 - i), new IntegrationMessageHeaderAccessor(m).getPriority());
|
||||
m = this.testChannel3.receive(0);
|
||||
assertNotNull(m);
|
||||
assertEquals(Integer.valueOf(9-i), new IntegrationMessageHeaderAccessor(m).getPriority());
|
||||
assertEquals(Integer.valueOf(9 - i), new IntegrationMessageHeaderAccessor(m).getPriority());
|
||||
}
|
||||
Message<?> m = this.testChannel3.receive(0);
|
||||
assertNotNull(m);
|
||||
|
||||
@@ -68,7 +68,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testNonExistingEmptyMessageGroup() throws Exception{
|
||||
public void testNonExistingEmptyMessageGroup() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -80,7 +80,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testMessageGroupUpdatedDateChangesWithEachAddedMessage() throws Exception{
|
||||
public void testMessageGroupUpdatedDateChangesWithEachAddedMessage() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -107,7 +107,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testMessageGroupWithAddedMessage() throws Exception{
|
||||
public void testMessageGroupWithAddedMessage() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -125,7 +125,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testRemoveMessageGroup() throws Exception{
|
||||
public void testRemoveMessageGroup() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -152,7 +152,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testCompleteMessageGroup() throws Exception{
|
||||
public void testCompleteMessageGroup() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -166,7 +166,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testLastReleasedSequenceNumber() throws Exception{
|
||||
public void testLastReleasedSequenceNumber() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -180,7 +180,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testRemoveMessageFromTheGroup() throws Exception{
|
||||
public void testRemoveMessageFromTheGroup() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -204,7 +204,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testWithMessageHistory() throws Exception{
|
||||
public void testWithMessageHistory() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -231,7 +231,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
}
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testRemoveNonExistingMessageFromTheGroup() throws Exception{
|
||||
public void testRemoveNonExistingMessageFromTheGroup() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -242,7 +242,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testRemoveNonExistingMessageFromNonExistingTheGroup() throws Exception{
|
||||
public void testRemoveNonExistingMessageFromNonExistingTheGroup() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
store.removeMessagesFromGroup(1, new GenericMessage<String>("2"));
|
||||
@@ -252,7 +252,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testMultipleInstancesOfGroupStore() throws Exception{
|
||||
public void testMultipleInstancesOfGroupStore() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store1 = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -274,7 +274,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testIteratorOfMessageGroups() throws Exception{
|
||||
public void testIteratorOfMessageGroups() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
RedisMessageStore store1 = new RedisMessageStore(jcf);
|
||||
RedisMessageStore store2 = new RedisMessageStore(jcf);
|
||||
@@ -290,7 +290,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
while (messageGroups.hasNext()) {
|
||||
MessageGroup group = messageGroups.next();
|
||||
String groupId = (String) group.getGroupId();
|
||||
if (groupId.equals("1")){
|
||||
if (groupId.equals("1")) {
|
||||
assertEquals(1, group.getMessages().size());
|
||||
}
|
||||
else if (groupId.equals("2")) {
|
||||
@@ -316,7 +316,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable @Ignore
|
||||
public void testConcurrentModifications() throws Exception{
|
||||
public void testConcurrentModifications() throws Exception {
|
||||
RedisConnectionFactory jcf = getConnectionFactoryForTest();
|
||||
final RedisMessageStore store1 = new RedisMessageStore(jcf);
|
||||
final RedisMessageStore store2 = new RedisMessageStore(jcf);
|
||||
@@ -334,7 +334,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
@Override
|
||||
public void run() {
|
||||
MessageGroup group = store1.addMessageToGroup(1, message);
|
||||
if (group.getMessages().size() != 1){
|
||||
if (group.getMessages().size() != 1) {
|
||||
failures.add("ADD");
|
||||
throw new AssertionFailedError("Failed on ADD");
|
||||
}
|
||||
@@ -345,7 +345,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
public void run() {
|
||||
store2.removeMessagesFromGroup(1, message);
|
||||
MessageGroup group = store2.getMessageGroup(1);
|
||||
if (group.getMessages().size() != 0){
|
||||
if (group.getMessages().size() != 0) {
|
||||
failures.add("REMOVE");
|
||||
throw new AssertionFailedError("Failed on Remove");
|
||||
}
|
||||
@@ -361,7 +361,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testWithAggregatorWithShutdown(){
|
||||
public void testWithAggregatorWithShutdown() {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("redis-aggregator-config.xml", getClass());
|
||||
MessageChannel input = context.getBean("inputChannel", MessageChannel.class);
|
||||
QueueChannel output = context.getBean("outputChannel", QueueChannel.class);
|
||||
|
||||
@@ -58,7 +58,7 @@ public class RedisMessageStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testGetNonExistingMessage(){
|
||||
public void testGetNonExistingMessage() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
Message<?> message = store.getMessage(UUID.randomUUID());
|
||||
@@ -67,7 +67,7 @@ public class RedisMessageStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testGetMessageCountWhenEmpty(){
|
||||
public void testGetMessageCountWhenEmpty() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
assertEquals(0, store.getMessageCount());
|
||||
@@ -75,7 +75,7 @@ public class RedisMessageStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testAddStringMessage(){
|
||||
public void testAddStringMessage() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
Message<String> stringMessage = new GenericMessage<String>("Hello Redis");
|
||||
@@ -86,7 +86,7 @@ public class RedisMessageStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testAddSerializableObjectMessage(){
|
||||
public void testAddSerializableObjectMessage() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
Address address = new Address();
|
||||
@@ -101,7 +101,7 @@ public class RedisMessageStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@RedisAvailable
|
||||
public void testAddNonSerializableObjectMessage(){
|
||||
public void testAddNonSerializableObjectMessage() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -112,7 +112,7 @@ public class RedisMessageStoreTests extends RedisAvailableTests {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testAddAndGetStringMessage(){
|
||||
public void testAddAndGetStringMessage() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
Message<String> stringMessage = new GenericMessage<String>("Hello Redis");
|
||||
@@ -125,7 +125,7 @@ public class RedisMessageStoreTests extends RedisAvailableTests {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testAddAndRemoveStringMessage(){
|
||||
public void testAddAndRemoveStringMessage() {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
Message<String> stringMessage = new GenericMessage<String>("Hello Redis");
|
||||
@@ -138,7 +138,7 @@ public class RedisMessageStoreTests extends RedisAvailableTests {
|
||||
|
||||
@Test
|
||||
@RedisAvailable
|
||||
public void testWithMessageHistory() throws Exception{
|
||||
public void testWithMessageHistory() throws Exception {
|
||||
RedisConnectionFactory jcf = this.getConnectionFactoryForTest();
|
||||
RedisMessageStore store = new RedisMessageStore(jcf);
|
||||
|
||||
@@ -185,7 +185,7 @@ public class RedisMessageStoreTests extends RedisAvailableTests {
|
||||
|
||||
private String name;
|
||||
|
||||
public Person(Address address, String name){
|
||||
public Person(Address address, String name) {
|
||||
this.address = address;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ public class AggregatorWithRedisLocksTests extends RedisAvailableTests {
|
||||
|
||||
@Override
|
||||
public boolean canRelease(MessageGroup group) {
|
||||
synchronized(this) {
|
||||
synchronized (this) {
|
||||
this.callers.incrementAndGet();
|
||||
this.maxCallers.set(Math.max(this.maxCallers.get(), this.callers.get()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user