diff --git a/build.gradle b/build.gradle index ad03a9d974..1af9cd8564 100644 --- a/build.gradle +++ b/build.gradle @@ -59,12 +59,14 @@ subprojects { subproject -> eaioUUIDVersion = '3.2' ftpServerVersion = '1.0.6' + springVersionDefault = '3.1.4.RELEASE' springVersion = project.hasProperty('springVersion') ? getProperty('springVersion') : springVersionDefault springAmqpVersion = '1.2.0.RELEASE' springDataMongoVersion = '1.1.1.RELEASE' - springDataRedisVersion = '1.0.5.RELEASE' + springDataRedisVersion = '1.1.0.RELEASE' + lettuceVersion = '2.3.3' springGemfireVersion = '1.3.1.RELEASE' springSecurityVersion = '3.1.3.RELEASE' springSocialTwitterVersion = '1.0.5.RELEASE' @@ -437,6 +439,7 @@ project('spring-integration-redis') { exclude group: 'org.springframework', module: 'spring-tx' } testCompile project(":spring-integration-test") + testCompile "com.lambdaworks:lettuce:$lettuceVersion" } } @@ -539,6 +542,7 @@ project('spring-integration-twitter') { testCompile project(":spring-integration-test") testCompile project(":spring-integration-redis") testCompile project(":spring-integration-redis").sourceSets.test.output + testCompile "com.lambdaworks:lettuce:$lettuceVersion" } } diff --git a/spring-integration-redis/jredis.log b/spring-integration-redis/jredis.log deleted file mode 100644 index 2412d1df46..0000000000 --- a/spring-integration-redis/jredis.log +++ /dev/null @@ -1,556 +0,0 @@ -2011-07-19 16:08:49,351 DEBUG [org.springframework.test.context.junit4.SpringJUnit4ClassRunner] - SpringJUnit4ClassRunner constructor called with [class org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests]. -2011-07-19 16:08:49,377 INFO [org.springframework.test.context.TestContextManager] - @TestExecutionListeners is not present for class [class org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests]: using defaults. -2011-07-19 16:08:49,394 DEBUG [org.springframework.test.context.junit4.SpringJUnit4ClassRunner] - SpringJUnit4ClassRunner constructor called with [class org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests]. -2011-07-19 16:08:49,394 INFO [org.springframework.test.context.TestContextManager] - @TestExecutionListeners is not present for class [class org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests]: using defaults. -2011-07-19 16:08:49,705 DEBUG [org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer] - Postpone listening for Redis messages until actual listeners are added -2011-07-19 16:08:54,705 DEBUG [org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer] - Started RedisMessageListenerContainer -2011-07-19 16:08:54,728 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] -2011-07-19 16:08:54,729 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] -2011-07-19 16:08:54,729 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] -2011-07-19 16:08:54,729 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] -2011-07-19 16:08:54,730 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] -2011-07-19 16:08:54,730 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] -2011-07-19 16:08:54,735 DEBUG [org.springframework.test.context.support.DependencyInjectionTestExecutionListener] - Performing dependency injection for test context [[TestContext@d78ec testClass = RedisOutboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml'], testInstance = org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests@7df472, testMethod = [null], testException = [null]]]. -2011-07-19 16:08:54,736 DEBUG [org.springframework.test.context.support.AbstractGenericContextLoader] - Loading ApplicationContext for locations [classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml]. -2011-07-19 16:08:54,839 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml] -2011-07-19 16:08:54,865 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] -2011-07-19 16:08:54,902 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading schema mappings from [META-INF/spring.schemas] -2011-07-19 16:08:54,904 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded schema mappings: {http://www.springframework.org/schema/redis/spring-redis-1.0.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/redis/spring-redis.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration-1.0.xsd=org/springframework/integration/config/xml/spring-integration-1.0.xsd, http://www.springframework.org/schema/integration/spring-integration-2.0.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} -2011-07-19 16:08:54,908 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd -2011-07-19 16:08:55,000 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/spring-integration-2.0.xsd] in classpath: org/springframework/integration/config/xml/spring-integration-2.0.xsd -2011-07-19 16:08:55,088 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd] in classpath: org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd -2011-07-19 16:08:55,117 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions -2011-07-19 16:08:55,134 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler, http://www.springframework.org/schema/redis=org.springframework.data.keyvalue.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/integration=org.springframework.integration.config.xml.IntegrationNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} -2011-07-19 16:08:55,193 DEBUG [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loaded 8 bean definitions from location pattern [classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml] -2011-07-19 16:08:55,213 INFO [org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@9a5d54: startup date [Tue Jul 19 16:08:55 EDT 2011]; root of context hierarchy -2011-07-19 16:08:55,214 DEBUG [org.springframework.context.support.GenericApplicationContext] - Bean factory for org.springframework.context.support.GenericApplicationContext@9a5d54: org.springframework.beans.factory.support.DefaultListableBeanFactory@549f0e: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy -2011-07-19 16:08:55,255 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,255 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,282 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,283 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,340 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,341 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,341 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,341 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,341 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. -2011-07-19 16:08:55,342 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created. -2011-07-19 16:08:55,348 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,348 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,349 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,349 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,349 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,349 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,350 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,350 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,352 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@125fac] -2011-07-19 16:08:55,356 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@158bbe] -2011-07-19 16:08:55,357 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@549f0e: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy -2011-07-19 16:08:55,357 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,358 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'sendChannel' -2011-07-19 16:08:55,358 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'sendChannel' -2011-07-19 16:08:55,361 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'sendChannel' to allow for resolving potential circular references -2011-07-19 16:08:55,383 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'sendChannel' -2011-07-19 16:08:55,383 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'sendChannel' -2011-07-19 16:08:55,383 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' -2011-07-19 16:08:55,383 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' -2011-07-19 16:08:55,407 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisConnectionFactory' -2011-07-19 16:08:55,407 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisConnectionFactory' -2011-07-19 16:08:55,421 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisConnectionFactory' to allow for resolving potential circular references -2011-07-19 16:08:55,426 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisConnectionFactory' -2011-07-19 16:08:55,428 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'redisConnectionFactory' -2011-07-19 16:08:55,434 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' to allow for resolving potential circular references -2011-07-19 16:08:55,437 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testConverter' -2011-07-19 16:08:55,437 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testConverter' -2011-07-19 16:08:55,437 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testConverter' to allow for resolving potential circular references -2011-07-19 16:08:55,442 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testConverter' -2011-07-19 16:08:55,442 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' -2011-07-19 16:08:55,442 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'outboundAdapter' -2011-07-19 16:08:55,443 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'outboundAdapter' -2011-07-19 16:08:55,446 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'outboundAdapter' to allow for resolving potential circular references -2011-07-19 16:08:55,450 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' -2011-07-19 16:08:55,460 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'outboundAdapter' -2011-07-19 16:08:55,460 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'sendChannel' -2011-07-19 16:08:55,461 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'outboundAdapter' -2011-07-19 16:08:55,462 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' -2011-07-19 16:08:55,462 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' -2011-07-19 16:08:55,462 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'redisConnectionFactory' -2011-07-19 16:08:55,464 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' to allow for resolving potential circular references -2011-07-19 16:08:55,474 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'receiveChannel' -2011-07-19 16:08:55,474 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'receiveChannel' -2011-07-19 16:08:55,475 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'receiveChannel' to allow for resolving potential circular references -2011-07-19 16:08:55,482 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'receiveChannel' -2011-07-19 16:08:55,482 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'receiveChannel' -2011-07-19 16:08:55,482 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' -2011-07-19 16:08:55,485 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@549f0e: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy -2011-07-19 16:08:55,486 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Retrieved dependent beans for bean 'redisConnectionFactory': [org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0] -2011-07-19 16:08:55,486 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Retrieved dependent beans for bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0': [outboundAdapter] -2011-07-19 16:08:55,486 DEBUG [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'redisConnectionFactory' -2011-07-19 16:08:55,489 ERROR [org.springframework.test.context.TestContextManager] - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@2bc418] to prepare test instance [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests@7df472] -java.lang.IllegalStateException: Failed to load ApplicationContext - at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308) - at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) - at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) - at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301) - at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) - at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) - at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) - at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) - at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) - at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) - at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) - at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) - at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) - at org.junit.runners.ParentRunner.run(ParentRunner.java:236) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) - at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) - at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) - at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) - at org.apache.maven.surefire.Surefire.run(Surefire.java:177) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) - at java.lang.reflect.Method.invoke(Method.java:585) - at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) - at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) -Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) - at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) - at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) - at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) - at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) - at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) - at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) - at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) - at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280) - at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304) - ... 28 more -Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B - at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:54) - at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:32) - at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addListener(RedisMessageListenerContainer.java:451) - at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addMessageListener(RedisMessageListenerContainer.java:377) - at org.springframework.integration.redis.inbound.RedisInboundChannelAdapter.onInit(RedisInboundChannelAdapter.java:77) - at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:98) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) - ... 41 more -2011-07-19 16:08:55,495 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] -2011-07-19 16:08:55,495 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] -2011-07-19 16:08:55,495 DEBUG [org.springframework.test.context.support.DependencyInjectionTestExecutionListener] - Performing dependency injection for test context [[TestContext@d78ec testClass = RedisOutboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml'], testInstance = org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests@145315, testMethod = [null], testException = [null]]]. -2011-07-19 16:08:55,495 DEBUG [org.springframework.test.context.support.AbstractGenericContextLoader] - Loading ApplicationContext for locations [classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml]. -2011-07-19 16:08:55,496 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml] -2011-07-19 16:08:55,498 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] -2011-07-19 16:08:55,501 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading schema mappings from [META-INF/spring.schemas] -2011-07-19 16:08:55,503 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded schema mappings: {http://www.springframework.org/schema/redis/spring-redis-1.0.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/redis/spring-redis.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration-1.0.xsd=org/springframework/integration/config/xml/spring-integration-1.0.xsd, http://www.springframework.org/schema/integration/spring-integration-2.0.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} -2011-07-19 16:08:55,547 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd -2011-07-19 16:08:55,582 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/spring-integration-2.0.xsd] in classpath: org/springframework/integration/config/xml/spring-integration-2.0.xsd -2011-07-19 16:08:55,614 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd] in classpath: org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd -2011-07-19 16:08:55,625 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions -2011-07-19 16:08:55,627 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler, http://www.springframework.org/schema/redis=org.springframework.data.keyvalue.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/integration=org.springframework.integration.config.xml.IntegrationNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} -2011-07-19 16:08:55,629 DEBUG [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loaded 8 bean definitions from location pattern [classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml] -2011-07-19 16:08:55,637 INFO [org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@5aa997: startup date [Tue Jul 19 16:08:55 EDT 2011]; root of context hierarchy -2011-07-19 16:08:55,637 DEBUG [org.springframework.context.support.GenericApplicationContext] - Bean factory for org.springframework.context.support.GenericApplicationContext@5aa997: org.springframework.beans.factory.support.DefaultListableBeanFactory@e3e4c5: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy -2011-07-19 16:08:55,639 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,639 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,639 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,639 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,669 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,669 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,670 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,670 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,670 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. -2011-07-19 16:08:55,670 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created. -2011-07-19 16:08:55,672 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,672 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,672 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,672 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,673 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,673 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,673 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,673 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,673 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@40c4d5] -2011-07-19 16:08:55,674 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@3aab44] -2011-07-19 16:08:55,675 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e3e4c5: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy -2011-07-19 16:08:55,675 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,675 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'sendChannel' -2011-07-19 16:08:55,675 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'sendChannel' -2011-07-19 16:08:55,676 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'sendChannel' to allow for resolving potential circular references -2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'sendChannel' -2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'sendChannel' -2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' -2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' -2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisConnectionFactory' -2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisConnectionFactory' -2011-07-19 16:08:55,678 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisConnectionFactory' to allow for resolving potential circular references -2011-07-19 16:08:55,678 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisConnectionFactory' -2011-07-19 16:08:55,678 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'redisConnectionFactory' -2011-07-19 16:08:55,680 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' to allow for resolving potential circular references -2011-07-19 16:08:55,681 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testConverter' -2011-07-19 16:08:55,681 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testConverter' -2011-07-19 16:08:55,682 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testConverter' to allow for resolving potential circular references -2011-07-19 16:08:55,682 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testConverter' -2011-07-19 16:08:55,682 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' -2011-07-19 16:08:55,682 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'outboundAdapter' -2011-07-19 16:08:55,682 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'outboundAdapter' -2011-07-19 16:08:55,683 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'outboundAdapter' to allow for resolving potential circular references -2011-07-19 16:08:55,683 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' -2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'outboundAdapter' -2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'sendChannel' -2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'outboundAdapter' -2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' -2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' -2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'redisConnectionFactory' -2011-07-19 16:08:55,686 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' to allow for resolving potential circular references -2011-07-19 16:08:55,686 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'receiveChannel' -2011-07-19 16:08:55,686 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'receiveChannel' -2011-07-19 16:08:55,687 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'receiveChannel' to allow for resolving potential circular references -2011-07-19 16:08:55,687 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'receiveChannel' -2011-07-19 16:08:55,687 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'receiveChannel' -2011-07-19 16:08:55,688 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' -2011-07-19 16:08:55,688 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e3e4c5: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy -2011-07-19 16:08:55,688 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Retrieved dependent beans for bean 'redisConnectionFactory': [org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0] -2011-07-19 16:08:55,688 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Retrieved dependent beans for bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0': [outboundAdapter] -2011-07-19 16:08:55,688 DEBUG [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'redisConnectionFactory' -2011-07-19 16:08:55,688 ERROR [org.springframework.test.context.TestContextManager] - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@2bc418] to prepare test instance [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests@145315] -java.lang.IllegalStateException: Failed to load ApplicationContext - at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308) - at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) - at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) - at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301) - at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) - at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) - at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) - at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) - at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) - at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) - at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) - at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) - at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) - at org.junit.runners.ParentRunner.run(ParentRunner.java:236) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) - at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) - at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) - at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) - at org.apache.maven.surefire.Surefire.run(Surefire.java:177) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) - at java.lang.reflect.Method.invoke(Method.java:585) - at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) - at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) -Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) - at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) - at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) - at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) - at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) - at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) - at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) - at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) - at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280) - at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304) - ... 28 more -Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B - at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:54) - at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:32) - at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addListener(RedisMessageListenerContainer.java:451) - at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addMessageListener(RedisMessageListenerContainer.java:377) - at org.springframework.integration.redis.inbound.RedisInboundChannelAdapter.onInit(RedisInboundChannelAdapter.java:77) - at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:98) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) - ... 41 more -2011-07-19 16:08:55,698 DEBUG [org.springframework.test.context.support.DirtiesContextTestExecutionListener] - After test class: context [[TestContext@d78ec testClass = RedisOutboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml'], testInstance = [null], testMethod = [null], testException = [null]]], dirtiesContext [false]. -2011-07-19 16:08:55,704 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] -2011-07-19 16:08:55,705 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] -2011-07-19 16:08:55,705 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] -2011-07-19 16:08:55,705 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] -2011-07-19 16:08:55,706 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] -2011-07-19 16:08:55,707 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] -2011-07-19 16:08:55,707 DEBUG [org.springframework.test.context.support.DependencyInjectionTestExecutionListener] - Performing dependency injection for test context [[TestContext@932892 testClass = RedisInboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml'], testInstance = org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests@4cab63, testMethod = [null], testException = [null]]]. -2011-07-19 16:08:55,707 DEBUG [org.springframework.test.context.support.AbstractGenericContextLoader] - Loading ApplicationContext for locations [classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml]. -2011-07-19 16:08:55,710 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml] -2011-07-19 16:08:55,712 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] -2011-07-19 16:08:55,713 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading schema mappings from [META-INF/spring.schemas] -2011-07-19 16:08:55,763 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded schema mappings: {http://www.springframework.org/schema/redis/spring-redis-1.0.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/redis/spring-redis.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration-1.0.xsd=org/springframework/integration/config/xml/spring-integration-1.0.xsd, http://www.springframework.org/schema/integration/spring-integration-2.0.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} -2011-07-19 16:08:55,764 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd -2011-07-19 16:08:55,784 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd] in classpath: org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd -2011-07-19 16:08:55,787 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/spring-integration-2.0.xsd] in classpath: org/springframework/integration/config/xml/spring-integration-2.0.xsd -2011-07-19 16:08:55,826 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions -2011-07-19 16:08:55,830 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler, http://www.springframework.org/schema/redis=org.springframework.data.keyvalue.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/integration=org.springframework.integration.config.xml.IntegrationNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} -2011-07-19 16:08:55,831 DEBUG [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loaded 6 bean definitions from location pattern [classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml] -2011-07-19 16:08:55,832 INFO [org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@881734: startup date [Tue Jul 19 16:08:55 EDT 2011]; root of context hierarchy -2011-07-19 16:08:55,832 DEBUG [org.springframework.context.support.GenericApplicationContext] - Bean factory for org.springframework.context.support.GenericApplicationContext@881734: org.springframework.beans.factory.support.DefaultListableBeanFactory@61daf0: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy -2011-07-19 16:08:55,833 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,834 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,834 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,835 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,841 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,841 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,842 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,842 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,842 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. -2011-07-19 16:08:55,842 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created. -2011-07-19 16:08:55,844 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,844 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,844 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,844 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,845 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,845 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,845 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,845 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,845 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@da7b85] -2011-07-19 16:08:55,845 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@e373de] -2011-07-19 16:08:55,846 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@61daf0: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy -2011-07-19 16:08:55,847 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,847 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'adapter' -2011-07-19 16:08:55,847 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'adapter' -2011-07-19 16:08:55,847 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisConnectionFactory' -2011-07-19 16:08:55,847 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisConnectionFactory' -2011-07-19 16:08:55,848 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisConnectionFactory' to allow for resolving potential circular references -2011-07-19 16:08:55,848 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisConnectionFactory' -2011-07-19 16:08:55,848 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'redisConnectionFactory' -2011-07-19 16:08:55,850 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'adapter' to allow for resolving potential circular references -2011-07-19 16:08:55,851 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'receiveChannel' -2011-07-19 16:08:55,851 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'receiveChannel' -2011-07-19 16:08:55,852 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'receiveChannel' to allow for resolving potential circular references -2011-07-19 16:08:55,852 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'receiveChannel' -2011-07-19 16:08:55,852 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'receiveChannel' -2011-07-19 16:08:55,853 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testErrorChannel' -2011-07-19 16:08:55,853 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testErrorChannel' -2011-07-19 16:08:55,853 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testErrorChannel' to allow for resolving potential circular references -2011-07-19 16:08:55,854 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'testErrorChannel' -2011-07-19 16:08:55,854 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testErrorChannel' -2011-07-19 16:08:55,854 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testConverter' -2011-07-19 16:08:55,855 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testConverter' -2011-07-19 16:08:55,855 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testConverter' to allow for resolving potential circular references -2011-07-19 16:08:55,859 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testConverter' -2011-07-19 16:08:55,859 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'adapter' -2011-07-19 16:08:55,860 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@61daf0: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy -2011-07-19 16:08:55,860 DEBUG [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'redisConnectionFactory' -2011-07-19 16:08:55,860 ERROR [org.springframework.test.context.TestContextManager] - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1c9ca1] to prepare test instance [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests@4cab63] -java.lang.IllegalStateException: Failed to load ApplicationContext - at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308) - at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) - at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) - at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301) - at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) - at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) - at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) - at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) - at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) - at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) - at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) - at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) - at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) - at org.junit.runners.ParentRunner.run(ParentRunner.java:236) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) - at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) - at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) - at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) - at org.apache.maven.surefire.Surefire.run(Surefire.java:177) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) - at java.lang.reflect.Method.invoke(Method.java:585) - at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) - at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) -Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adapter': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) - at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) - at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) - at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) - at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) - at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) - at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) - at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) - at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280) - at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304) - ... 28 more -Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B - at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:54) - at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:32) - at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addListener(RedisMessageListenerContainer.java:451) - at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addMessageListener(RedisMessageListenerContainer.java:377) - at org.springframework.integration.redis.inbound.RedisInboundChannelAdapter.onInit(RedisInboundChannelAdapter.java:77) - at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:98) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) - ... 41 more -2011-07-19 16:08:55,865 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] -2011-07-19 16:08:55,865 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] -2011-07-19 16:08:55,865 DEBUG [org.springframework.test.context.support.DependencyInjectionTestExecutionListener] - Performing dependency injection for test context [[TestContext@932892 testClass = RedisInboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml'], testInstance = org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests@6f29c8, testMethod = [null], testException = [null]]]. -2011-07-19 16:08:55,865 DEBUG [org.springframework.test.context.support.AbstractGenericContextLoader] - Loading ApplicationContext for locations [classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml]. -2011-07-19 16:08:55,866 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml] -2011-07-19 16:08:55,867 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] -2011-07-19 16:08:55,870 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading schema mappings from [META-INF/spring.schemas] -2011-07-19 16:08:55,871 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded schema mappings: {http://www.springframework.org/schema/redis/spring-redis-1.0.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/redis/spring-redis.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration-1.0.xsd=org/springframework/integration/config/xml/spring-integration-1.0.xsd, http://www.springframework.org/schema/integration/spring-integration-2.0.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} -2011-07-19 16:08:55,873 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd -2011-07-19 16:08:55,933 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd] in classpath: org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd -2011-07-19 16:08:55,935 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/spring-integration-2.0.xsd] in classpath: org/springframework/integration/config/xml/spring-integration-2.0.xsd -2011-07-19 16:08:55,966 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions -2011-07-19 16:08:55,968 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler, http://www.springframework.org/schema/redis=org.springframework.data.keyvalue.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/integration=org.springframework.integration.config.xml.IntegrationNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} -2011-07-19 16:08:55,970 DEBUG [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loaded 6 bean definitions from location pattern [classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml] -2011-07-19 16:08:55,971 INFO [org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@2011e5: startup date [Tue Jul 19 16:08:55 EDT 2011]; root of context hierarchy -2011-07-19 16:08:55,971 DEBUG [org.springframework.context.support.GenericApplicationContext] - Bean factory for org.springframework.context.support.GenericApplicationContext@2011e5: org.springframework.beans.factory.support.DefaultListableBeanFactory@fd4bba: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy -2011-07-19 16:08:55,972 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,972 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,972 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,972 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' -2011-07-19 16:08:55,976 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,977 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,977 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,977 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,977 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. -2011-07-19 16:08:55,977 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created. -2011-07-19 16:08:55,980 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,980 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,980 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,981 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' -2011-07-19 16:08:55,981 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,981 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,981 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references -2011-07-19 16:08:55,981 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' -2011-07-19 16:08:55,981 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@bf8785] -2011-07-19 16:08:55,981 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@5a5ee5] -2011-07-19 16:08:55,982 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@fd4bba: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy -2011-07-19 16:08:55,983 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:55,983 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'adapter' -2011-07-19 16:08:55,983 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'adapter' -2011-07-19 16:08:55,983 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisConnectionFactory' -2011-07-19 16:08:55,983 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisConnectionFactory' -2011-07-19 16:08:55,984 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisConnectionFactory' to allow for resolving potential circular references -2011-07-19 16:08:55,984 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisConnectionFactory' -2011-07-19 16:08:55,984 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'redisConnectionFactory' -2011-07-19 16:08:55,986 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'adapter' to allow for resolving potential circular references -2011-07-19 16:08:55,987 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'receiveChannel' -2011-07-19 16:08:55,987 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'receiveChannel' -2011-07-19 16:08:55,987 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'receiveChannel' to allow for resolving potential circular references -2011-07-19 16:08:55,987 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'receiveChannel' -2011-07-19 16:08:55,988 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'receiveChannel' -2011-07-19 16:08:55,988 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testErrorChannel' -2011-07-19 16:08:55,988 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testErrorChannel' -2011-07-19 16:08:55,988 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testErrorChannel' to allow for resolving potential circular references -2011-07-19 16:08:55,989 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'testErrorChannel' -2011-07-19 16:08:55,989 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testErrorChannel' -2011-07-19 16:08:55,989 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testConverter' -2011-07-19 16:08:55,989 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testConverter' -2011-07-19 16:08:55,989 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testConverter' to allow for resolving potential circular references -2011-07-19 16:08:55,990 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testConverter' -2011-07-19 16:08:55,990 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'adapter' -2011-07-19 16:08:55,990 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@fd4bba: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy -2011-07-19 16:08:55,990 DEBUG [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'redisConnectionFactory' -2011-07-19 16:08:55,990 ERROR [org.springframework.test.context.TestContextManager] - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1c9ca1] to prepare test instance [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests@6f29c8] -java.lang.IllegalStateException: Failed to load ApplicationContext - at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308) - at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) - at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) - at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301) - at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) - at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) - at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) - at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) - at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) - at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) - at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) - at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) - at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) - at org.junit.runners.ParentRunner.run(ParentRunner.java:236) - at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) - at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) - at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) - at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) - at org.apache.maven.surefire.Surefire.run(Surefire.java:177) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) - at java.lang.reflect.Method.invoke(Method.java:585) - at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) - at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) -Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adapter': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) - at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) - at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) - at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) - at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) - at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) - at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) - at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) - at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280) - at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304) - ... 28 more -Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B - at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:54) - at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:32) - at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addListener(RedisMessageListenerContainer.java:451) - at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addMessageListener(RedisMessageListenerContainer.java:377) - at org.springframework.integration.redis.inbound.RedisInboundChannelAdapter.onInit(RedisInboundChannelAdapter.java:77) - at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:98) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) - ... 41 more -2011-07-19 16:08:55,998 DEBUG [org.springframework.test.context.support.DirtiesContextTestExecutionListener] - After test class: context [[TestContext@932892 testClass = RedisInboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml'], testInstance = [null], testMethod = [null], testException = [null]]], dirtiesContext [false]. -2011-07-19 16:08:56,008 INFO [org.springframework.context.support.ClassPathXmlApplicationContext] - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@cf6930: startup date [Tue Jul 19 16:08:56 EDT 2011]; root of context hierarchy -2011-07-19 16:08:56,009 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/integration/redis/config/RedisChannelParserTests-context.xml] -2011-07-19 16:08:56,011 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] -2011-07-19 16:08:56,012 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading schema mappings from [META-INF/spring.schemas] -2011-07-19 16:08:56,015 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded schema mappings: {http://www.springframework.org/schema/redis/spring-redis-1.0.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/redis/spring-redis.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration-1.0.xsd=org/springframework/integration/config/xml/spring-integration-1.0.xsd, http://www.springframework.org/schema/integration/spring-integration-2.0.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} -2011-07-19 16:08:56,016 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd -2011-07-19 16:08:56,068 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd] in classpath: org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd -2011-07-19 16:08:56,071 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/spring-integration-2.0.xsd] in classpath: org/springframework/integration/config/xml/spring-integration-2.0.xsd -2011-07-19 16:08:56,097 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions -2011-07-19 16:08:56,100 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler, http://www.springframework.org/schema/redis=org.springframework.data.keyvalue.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/integration=org.springframework.integration.config.xml.IntegrationNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} -2011-07-19 16:08:56,101 DEBUG [org.springframework.context.support.ClassPathXmlApplicationContext] - Bean factory for org.springframework.context.support.ClassPathXmlApplicationContext@cf6930: org.springframework.beans.factory.support.DefaultListableBeanFactory@4145b1: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,redisChannel,redisConnectionFactory]; root of factory hierarchy -2011-07-19 16:08:56,103 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:56,103 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:56,103 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' to allow for resolving potential circular references -2011-07-19 16:08:56,103 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:56,103 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. -2011-07-19 16:08:56,103 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created. -2011-07-19 16:08:56,104 DEBUG [org.springframework.context.support.ClassPathXmlApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@fdf894] -2011-07-19 16:08:56,104 DEBUG [org.springframework.context.support.ClassPathXmlApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@cac7d3] -2011-07-19 16:08:56,105 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4145b1: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,redisChannel,redisConnectionFactory,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy -2011-07-19 16:08:56,105 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' -2011-07-19 16:08:56,105 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisChannel' -2011-07-19 16:08:56,105 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisChannel' -2011-07-19 16:08:56,106 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisConnectionFactory' -2011-07-19 16:08:56,106 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisConnectionFactory' -2011-07-19 16:08:56,106 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisConnectionFactory' to allow for resolving potential circular references -2011-07-19 16:08:56,106 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisConnectionFactory' -2011-07-19 16:08:56,106 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'redisConnectionFactory' -2011-07-19 16:08:56,108 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisChannel' to allow for resolving potential circular references -2011-07-19 16:08:56,114 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisChannel' -2011-07-19 16:08:56,115 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4145b1: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,redisChannel,redisConnectionFactory,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy -2011-07-19 16:08:56,115 DEBUG [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'redisConnectionFactory' diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/channel/SubscribableRedisChannelTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/channel/SubscribableRedisChannelTests.java index 51dfb65487..64b7947234 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/channel/SubscribableRedisChannelTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/channel/SubscribableRedisChannelTests.java @@ -17,22 +17,25 @@ package org.springframework.integration.redis.channel; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; import java.lang.reflect.InvocationTargetException; import java.util.Map; import java.util.Set; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import org.junit.Test; -import org.mockito.Mockito; + import org.springframework.beans.factory.BeanFactory; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.connection.RedisConnection; +import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.listener.RedisMessageListenerContainer; import org.springframework.data.redis.listener.adapter.MessageListenerAdapter; import org.springframework.integration.Message; +import org.springframework.integration.MessagingException; import org.springframework.integration.core.MessageHandler; import org.springframework.integration.message.GenericMessage; import org.springframework.integration.redis.rules.RedisAvailable; @@ -42,39 +45,51 @@ import org.springframework.util.ReflectionUtils; /** * @author Oleg Zhurakousky * @author Gary Russell + * @author Artem Bilan * @since 2.0 */ -public class SubscribableRedisChannelTests extends RedisAvailableTests{ +public class SubscribableRedisChannelTests extends RedisAvailableTests { @Test @RedisAvailable - public void pubSubChanneTest() throws Exception{ - JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); - connectionFactory.setPort(7379); - connectionFactory.afterPropertiesSet(); + public void pubSubChannelTest() throws Exception{ + RedisConnectionFactory connectionFactory = this.getConnectionFactoryForTest(); SubscribableRedisChannel channel = new SubscribableRedisChannel(connectionFactory, "si.test.channel"); channel.setBeanFactory(mock(BeanFactory.class)); channel.afterPropertiesSet(); channel.start(); - MessageHandler handler = mock(MessageHandler.class); + + RedisConnection connection = TestUtils.getPropertyValue(channel, "container.subscriptionTask.connection", + RedisConnection.class); + + int n = 0; + while (n++ < 100 && !connection.isSubscribed()) { + Thread.sleep(100); + } + assertTrue(n < 100); + + final CountDownLatch latch = new CountDownLatch(3); + MessageHandler handler = new MessageHandler() { + + @Override + public void handleMessage(Message message) throws MessagingException { + latch.countDown(); + } + }; channel.subscribe(handler); channel.send(new GenericMessage("1")); channel.send(new GenericMessage("2")); channel.send(new GenericMessage("3")); - Thread.sleep(1000); - verify(handler, times(3)).handleMessage(Mockito.any(Message.class)); - channel.stop(); + assertTrue(latch.await(5, TimeUnit.SECONDS)); } @Test @RedisAvailable public void dispatcherHasNoSubscribersTest() throws Exception{ - JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); - connectionFactory.setPort(7379); - connectionFactory.afterPropertiesSet(); + RedisConnectionFactory connectionFactory = this.getConnectionFactoryForTest(); SubscribableRedisChannel channel = new SubscribableRedisChannel(connectionFactory, "si.test.channel.no.subs"); channel.setBeanName("dhnsChannel"); diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests-context.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests-context.xml index ea85de380e..d41fce59a4 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests-context.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests-context.xml @@ -12,8 +12,8 @@ - - + + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests.java index 8b7464ba5a..022eaa19ea 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests.java @@ -17,11 +17,15 @@ package org.springframework.integration.redis.config; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import org.junit.Test; -import org.mockito.Mockito; + import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.serializer.RedisSerializer; import org.springframework.integration.Message; import org.springframework.integration.MessagingException; @@ -36,6 +40,7 @@ import org.springframework.integration.test.util.TestUtils; * @author Oleg Zhurakousky * @author Gary Russell * @author Gunnar Hillert + * @author Artem Bilan */ public class RedisChannelParserTests extends RedisAvailableTests{ @@ -44,8 +49,8 @@ public class RedisChannelParserTests extends RedisAvailableTests{ public void testPubSubChannelConfig(){ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("RedisChannelParserTests-context.xml", this.getClass()); SubscribableChannel redisChannel = context.getBean("redisChannel", SubscribableChannel.class); - JedisConnectionFactory connectionFactory = - TestUtils.getPropertyValue(redisChannel, "connectionFactory", JedisConnectionFactory.class); + RedisConnectionFactory connectionFactory = + TestUtils.getPropertyValue(redisChannel, "connectionFactory", RedisConnectionFactory.class); RedisSerializer redisSerializer = TestUtils.getPropertyValue(redisChannel, "serializer", RedisSerializer.class); assertEquals(connectionFactory, context.getBean("redisConnectionFactory")); assertEquals(redisSerializer, context.getBean("redisSerializer")); @@ -65,20 +70,17 @@ public class RedisChannelParserTests extends RedisAvailableTests{ SubscribableChannel redisChannel = context.getBean("redisChannel", SubscribableChannel.class); final Message m = new GenericMessage("Hello Redis"); - final Marker marker = Mockito.mock(Marker.class); + final CountDownLatch latch = new CountDownLatch(1); redisChannel.subscribe(new MessageHandler() { public void handleMessage(Message message) throws MessagingException { assertEquals(m.getPayload(), message.getPayload()); - marker.mark(); + latch.countDown(); } }); redisChannel.send(m); - Thread.sleep(1000); - Mockito.verify(marker, Mockito.times(1)).mark(); + + assertTrue(latch.await(2, TimeUnit.SECONDS)); context.stop(); } - interface Marker { - void mark(); - } } diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml index 8e6c72c56a..832b822114 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml @@ -8,7 +8,7 @@ @@ -17,8 +17,8 @@ - - + + - + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java index 7f645041fa..e9bbe29fdc 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.DirectFieldAccessor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.ApplicationContext; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.integration.MessageChannel; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.redis.inbound.RedisInboundChannelAdapter; @@ -44,7 +44,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; */ @ContextConfiguration @RunWith(SpringJUnit4ClassRunner.class) -public class RedisInboundChannelAdapterParserTests extends RedisAvailableTests{ +public class RedisInboundChannelAdapterParserTests extends RedisAvailableTests { @Autowired private ApplicationContext context; @@ -71,16 +71,15 @@ public class RedisInboundChannelAdapterParserTests extends RedisAvailableTests{ @Test @RedisAvailable - public void testInboundChannelAdapterMessaging() throws Exception{ - JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); - connectionFactory.setPort(7379); - connectionFactory.afterPropertiesSet(); + public void testInboundChannelAdapterMessaging() throws Exception { + RedisConnectionFactory connectionFactory = this.getConnectionFactoryForTest(); + connectionFactory.getConnection().publish("foo".getBytes(), "Hello Redis from foo".getBytes()); - Thread.sleep(1000); + QueueChannel receiveChannel = context.getBean("receiveChannel", QueueChannel.class); - assertEquals("Hello Redis from foo", receiveChannel.receive(1000).getPayload()); + assertEquals("Hello Redis from foo", receiveChannel.receive(2000).getPayload()); connectionFactory.getConnection().publish("bar".getBytes(), "Hello Redis from bar".getBytes()); - assertEquals("Hello Redis from bar", receiveChannel.receive(1000).getPayload()); + assertEquals("Hello Redis from bar", receiveChannel.receive(2000).getPayload()); } @Test diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml index dcac318cea..b5126265a3 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml @@ -21,8 +21,8 @@ - - + + @@ -30,7 +30,7 @@ - + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/inbound-template-cf-fail.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/inbound-template-cf-fail.xml index 0e96584499..ef149a9974 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/inbound-template-cf-fail.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/inbound-template-cf-fail.xml @@ -16,9 +16,8 @@ - - + + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapterTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapterTests.java index fb8cf9bb7f..a94c429741 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapterTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2007-2011 the original author or authors + * Copyright 2007-2013 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,11 +16,17 @@ package org.springframework.integration.redis.inbound; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Test; + import org.springframework.data.redis.connection.RedisConnection; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.listener.RedisMessageListenerContainer; import org.springframework.integration.Message; @@ -29,11 +35,6 @@ import org.springframework.integration.redis.rules.RedisAvailable; import org.springframework.integration.redis.rules.RedisAvailableTests; import org.springframework.integration.test.util.TestUtils; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - /** * @author Mark Fisher * @since 2.1 @@ -42,7 +43,7 @@ public class RedisInboundChannelAdapterTests extends RedisAvailableTests{ private final Log logger = LogFactory.getLog(this.getClass()); - @Test + @Test @RedisAvailable public void testRedisInboundChannelAdapter() throws Exception { for (int iteration = 0; iteration < 10; iteration ++) { @@ -55,9 +56,7 @@ public class RedisInboundChannelAdapterTests extends RedisAvailableTests{ String redisChannelName = "testRedisInboundChannelAdapterChannel"; QueueChannel channel = new QueueChannel(); - JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); - connectionFactory.setPort(7379); - connectionFactory.afterPropertiesSet(); + RedisConnectionFactory connectionFactory = this.getConnectionFactoryForTest(); RedisInboundChannelAdapter adapter = new RedisInboundChannelAdapter(connectionFactory); adapter.setTopics("testRedisInboundChannelAdapterChannel"); @@ -87,7 +86,6 @@ public class RedisInboundChannelAdapterTests extends RedisAvailableTests{ assertEquals(numToTest, counter); adapter.stop(); container.stop(); - connectionFactory.destroy(); } /** diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisStoreInboundChannelAdapterIntegrationTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisStoreInboundChannelAdapterIntegrationTests.java index 3fffaaad4e..2a08b908ee 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisStoreInboundChannelAdapterIntegrationTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisStoreInboundChannelAdapterIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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,11 +19,12 @@ package org.springframework.integration.redis.inbound; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import org.junit.Test; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.support.collections.RedisList; import org.springframework.data.redis.support.collections.RedisZSet; import org.springframework.integration.Message; @@ -34,6 +35,7 @@ import org.springframework.integration.redis.rules.RedisAvailableTests; /** * @author Oleg Zhurakousky + * @author Artem Bilan * @since 2.2 */ public class RedisStoreInboundChannelAdapterIntegrationTests extends RedisAvailableTests{ @@ -42,7 +44,7 @@ public class RedisStoreInboundChannelAdapterIntegrationTests extends RedisAvaila @RedisAvailable @SuppressWarnings("unchecked") public void testListInboundConfiguration() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); this.prepareList(jcf); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("list-inbound-adapter.xml", this.getClass()); SourcePollingChannelAdapter spca = context.getBean("listAdapter", SourcePollingChannelAdapter.class); @@ -64,7 +66,7 @@ public class RedisStoreInboundChannelAdapterIntegrationTests extends RedisAvaila @RedisAvailable @SuppressWarnings("unchecked") public void testListInboundConfigurationWithSynchronization() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); this.prepareList(jcf); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("list-inbound-adapter.xml", this.getClass()); SourcePollingChannelAdapter spca = context.getBean("listAdapterWithSynchronization", SourcePollingChannelAdapter.class); @@ -87,7 +89,7 @@ public class RedisStoreInboundChannelAdapterIntegrationTests extends RedisAvaila @RedisAvailable @SuppressWarnings("unchecked") public void testListInboundConfigurationWithSynchronizationAndTemplate() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); this.prepareList(jcf); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("list-inbound-adapter.xml", this.getClass()); SourcePollingChannelAdapter spca = context.getBean("listAdapterWithSynchronizationAndRedisTemplate", SourcePollingChannelAdapter.class); @@ -110,7 +112,7 @@ public class RedisStoreInboundChannelAdapterIntegrationTests extends RedisAvaila @RedisAvailable @SuppressWarnings("unchecked") public void testZsetInboundConfiguration(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); this.prepareZset(jcf); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("zset-inbound-adapter.xml", this.getClass()); SourcePollingChannelAdapter zsetAdapterNoScore = @@ -136,7 +138,7 @@ public class RedisStoreInboundChannelAdapterIntegrationTests extends RedisAvaila @RedisAvailable @SuppressWarnings("unchecked") public void testZsetInboundConfigurationWithScoreRange(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); this.prepareZset(jcf); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("zset-inbound-adapter.xml", this.getClass()); SourcePollingChannelAdapter zsetAdapterWithScoreRange = @@ -162,7 +164,7 @@ public class RedisStoreInboundChannelAdapterIntegrationTests extends RedisAvaila @RedisAvailable @SuppressWarnings("unchecked") public void testZsetInboundConfigurationWithSingleScore(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); this.prepareZset(jcf); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("zset-inbound-adapter.xml", this.getClass()); SourcePollingChannelAdapter zsetAdapterWithSingleScore = @@ -188,7 +190,7 @@ public class RedisStoreInboundChannelAdapterIntegrationTests extends RedisAvaila @RedisAvailable @SuppressWarnings("unchecked") public void testZsetInboundConfigurationWithSingleScoreAndSynchronization() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); this.prepareZset(jcf); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("zset-inbound-adapter.xml", this.getClass()); SourcePollingChannelAdapter zsetAdapterWithSingleScoreAndSynchronization = @@ -199,31 +201,33 @@ public class RedisStoreInboundChannelAdapterIntegrationTests extends RedisAvaila QueueChannel redisChannel = context.getBean("redisChannel", QueueChannel.class); QueueChannel otherRedisChannel = context.getBean("otherRedisChannel", QueueChannel.class); + // get all 13 presidents zsetAdapterNoScore.start(); - Message> message = (Message>) redisChannel.receive(1000); assertNotNull(message); assertEquals(13, message.getPayload().size()); - zsetAdapterNoScore.stop(); - Thread.sleep(1000); + // get only presidents for 18th century zsetAdapterWithSingleScoreAndSynchronization.start(); - message = (Message>) otherRedisChannel.receive(1000); assertNotNull(message); assertEquals(2, message.getPayload().rangeByScore(18, 18).size()); - zsetAdapterWithSingleScoreAndSynchronization.stop(); - Thread.sleep(1000); // ... however other elements are still available 13-2=11 zsetAdapterNoScore.start(); message = (Message>) redisChannel.receive(1000); assertNotNull(message); - assertEquals(11, message.getPayload().size()); + + int n = 0; + while(n++ < 100 && message.getPayload().size() != 11) { + Thread.sleep(100); + } + assertTrue(n < 100); zsetAdapterNoScore.stop(); + context.close(); } diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/list-inbound-adapter.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/list-inbound-adapter.xml index 644444be30..b40c91700f 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/list-inbound-adapter.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/list-inbound-adapter.xml @@ -25,7 +25,7 @@ - + - + - + - + - + - + @@ -85,10 +85,10 @@ - - + + - + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/zset-inbound-adapter.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/zset-inbound-adapter.xml index 5b2e28e8a4..3e54052054 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/zset-inbound-adapter.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/zset-inbound-adapter.xml @@ -13,7 +13,7 @@ channel="redisChannel" auto-startup="false" collection-type="ZSET"> - + - + - + - + @@ -57,10 +57,11 @@ - - + + - + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandlerTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandlerTests.java index 2e0a00b94a..71f4b97f77 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandlerTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2007-2011 the original author or authors + * Copyright 2007-2013 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,12 +16,15 @@ package org.springframework.integration.redis.outbound; +import static org.junit.Assert.assertTrue; + import java.util.Collections; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.junit.Test; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; + +import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.listener.ChannelTopic; import org.springframework.data.redis.listener.RedisMessageListenerContainer; import org.springframework.data.redis.listener.Topic; @@ -31,24 +34,20 @@ import org.springframework.integration.redis.rules.RedisAvailable; import org.springframework.integration.redis.rules.RedisAvailableTests; import org.springframework.integration.support.MessageBuilder; -import static org.junit.Assert.assertEquals; - /** * @author Mark Fisher * @since 2.1 */ -public class RedisPublishingMessageHandlerTests extends RedisAvailableTests{ +public class RedisPublishingMessageHandlerTests extends RedisAvailableTests { - @Test + @Test @RedisAvailable public void testRedisPublishingMessageHandler() throws Exception { int numToTest = 10; String topic = "si.test.channel"; final CountDownLatch latch = new CountDownLatch(numToTest); - JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); - connectionFactory.setPort(7379); - connectionFactory.afterPropertiesSet(); + RedisConnectionFactory connectionFactory = this.getConnectionFactoryForTest(); MessageListenerAdapter listener = new MessageListenerAdapter(); listener.setDelegate(new Listener(latch)); @@ -67,8 +66,7 @@ public class RedisPublishingMessageHandlerTests extends RedisAvailableTests{ for (int i = 0; i < numToTest; i++) { handler.handleMessage(MessageBuilder.withPayload("test-" + i).build()); } - latch.await(3, TimeUnit.SECONDS); - assertEquals(0, latch.getCount()); + assertTrue(latch.await(3, TimeUnit.SECONDS)); container.stop(); } diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisStoreOutboundChannelAdapterIntegrationTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisStoreOutboundChannelAdapterIntegrationTests.java index 457c1c9e5a..33646a2153 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisStoreOutboundChannelAdapterIntegrationTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisStoreOutboundChannelAdapterIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2007-2012 the original author or authors + * Copyright 2007-2013 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. @@ -27,9 +27,9 @@ import java.util.Properties; import java.util.Set; import org.junit.Test; + import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.data.redis.connection.RedisConnectionFactory; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.serializer.StringRedisSerializer; @@ -63,7 +63,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testListWithKeyAsHeader(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisList redisList = new DefaultRedisList("pepboys", this.initTemplate(jcf, new StringRedisTemplate())); @@ -84,7 +84,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testListWithKeyAsHeaderSimple(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); StringRedisTemplate redisTemplate = new StringRedisTemplate(); RedisList redisList = @@ -103,7 +103,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testListWithProvidedKey(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisList redisList = new DefaultRedisList("pepboys", this.initTemplate(jcf, new StringRedisTemplate())); assertEquals(0, redisList.size()); @@ -123,7 +123,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testZsetSimplePayloadIncrement(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); StringRedisTemplate redisTemplate = new StringRedisTemplate(); RedisZSet redisZSet = @@ -148,7 +148,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testZsetSimplePayloadOverwrite(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); StringRedisTemplate redisTemplate = new StringRedisTemplate(); RedisZSet redisZSet = @@ -176,7 +176,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testZsetSimplePayloadIncrementBy2(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); StringRedisTemplate redisTemplate = new StringRedisTemplate(); RedisZSet redisZSet = @@ -204,7 +204,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testZsetSimplePayloadOverwriteWithHeaderScore(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); StringRedisTemplate redisTemplate = new StringRedisTemplate(); RedisZSet redisZSet = @@ -233,7 +233,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testMapToZsetWithProvidedKey(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisZSet redisZset = new DefaultRedisZSet("presidents", this.initTemplate(jcf, new StringRedisTemplate())); assertEquals(0, redisZset.size()); @@ -279,7 +279,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testMapToMapWithProvidedKey(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMap redisMap = new DefaultRedisMap("pepboys", this.initTemplate(jcf, new StringRedisTemplate())); @@ -308,7 +308,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test(expected=MessageHandlingException.class) // map key is not provided @RedisAvailable public void testMapToMapAsSingleEntryWithKeyAsHeaderFail(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMap> redisMap = new DefaultRedisMap>("pepboys", this.initTemplate(jcf, new RedisTemplate>>())); @@ -330,7 +330,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test(expected=MessageHandlingException.class) // key is not provided @RedisAvailable public void testMapToMapNoKey(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisTemplate>> redisTemplate = new RedisTemplate>>(); redisTemplate.setKeySerializer(new StringRedisSerializer()); redisTemplate.setHashKeySerializer(new StringRedisSerializer()); @@ -354,7 +354,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testMapToMapAsSingleEntryWithKeyAsHeader(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisTemplate>> redisTemplate = new RedisTemplate>>(); redisTemplate.setKeySerializer(new StringRedisSerializer()); redisTemplate.setHashKeySerializer(new StringRedisSerializer()); @@ -384,7 +384,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testStoreSimpleStringInMap(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); StringRedisTemplate redisTemplate = new StringRedisTemplate(); RedisMap redisMap = new DefaultRedisMap("bar", @@ -406,7 +406,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testSetWithKeyAsHeader(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisSet redisSet = new DefaultRedisSet("pepboys", this.initTemplate(jcf, new StringRedisTemplate())); assertEquals(0, redisSet.size()); @@ -426,7 +426,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testSetWithKeyAsHeaderSimple(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); StringRedisTemplate redisTemplate = new StringRedisTemplate(); RedisSet redisSet = new DefaultRedisSet("foo", this.initTemplate(jcf, redisTemplate)); @@ -445,7 +445,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testSetWithKeyAsHeaderNotParsed(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisTemplate redisTemplate = new RedisTemplate(); redisTemplate.setKeySerializer(new StringRedisSerializer()); redisTemplate.setHashKeySerializer(new StringRedisSerializer()); @@ -468,7 +468,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testPojoIntoSet(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisSet redisSet = new DefaultRedisSet("pepboys", this.initTemplate(jcf, new StringRedisTemplate())); assertEquals(0, redisSet.size()); @@ -485,7 +485,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testProperties(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisProperties redisProperties = new RedisProperties("pepboys", this.initTemplate(jcf, new StringRedisTemplate())); @@ -508,7 +508,7 @@ public class RedisStoreOutboundChannelAdapterIntegrationTests extends RedisAvail @Test @RedisAvailable public void testPropertiesSimple(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); StringRedisTemplate redisTemplate = new StringRedisTemplate(); RedisProperties redisProperties = new RedisProperties("foo", this.initTemplate(jcf, redisTemplate)); diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisStoreWritingMessageHandlerTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisStoreWritingMessageHandlerTests.java index bf8ce58bbe..c805f02ecd 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisStoreWritingMessageHandlerTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisStoreWritingMessageHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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,7 +30,6 @@ import java.util.Set; import org.junit.Test; import org.springframework.data.redis.connection.RedisConnectionFactory; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.ZSetOperations.TypedTuple; @@ -58,7 +57,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testListWithListPayloadParsedAndProvidedKey() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisList redisList = new DefaultRedisList(key, this.initTemplate(jcf, new StringRedisTemplate())); @@ -86,7 +85,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testListWithListPayloadParsedAndProvidedKeyAsHeader() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisList redisList = new DefaultRedisList(key, this.initTemplate(jcf, new StringRedisTemplate())); @@ -114,7 +113,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @RedisAvailable @Test(expected=MessageHandlingException.class) public void testListWithListPayloadParsedAndNoKey() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisList redisList = new DefaultRedisList(key, this.initTemplate(jcf, new RedisTemplate())); @@ -136,7 +135,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testListWithListPayloadAsSingleEntry() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisList> redisList = new DefaultRedisList>(key, this.initTemplate(jcf, new RedisTemplate>())); @@ -167,7 +166,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testZsetWithListPayloadParsedAndProvidedKeyDefault() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisZSet redisZset = new DefaultRedisZSet(key, this.initTemplate(jcf, new StringRedisTemplate())); @@ -205,7 +204,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testZsetWithListPayloadParsedAndProvidedKeyScoreIncrement() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisZSet redisZset = new DefaultRedisZSet(key, this.initTemplate(jcf, new StringRedisTemplate())); @@ -246,7 +245,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testZsetWithListPayloadParsedAndProvidedKeyScoreIncrementAsStringHeader() {// see INT-2775 - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisZSet redisZset = new DefaultRedisZSet(key, this.initTemplate(jcf, new StringRedisTemplate())); @@ -287,7 +286,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testZsetWithListPayloadAsSingleEntryAndHeaderKeyHeaderScore() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisZSet> redisZset = new DefaultRedisZSet>(key, this.initTemplate(jcf, new RedisTemplate>())); @@ -320,7 +319,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testZsetWithMapPayloadParsedHeaderKey() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "presidents"; RedisZSet redisZset = new DefaultRedisZSet(key, this.initTemplate(jcf, new StringRedisTemplate())); @@ -362,7 +361,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testZsetWithMapPayloadPojoParsedHeaderKey() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "presidents"; RedisZSet redisZset = new DefaultRedisZSet(key, this.initTemplate(jcf, new RedisTemplate())); @@ -405,7 +404,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testZsetWithMapPayloadPojoAsSingleEntryHeaderKey() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "presidents"; RedisZSet> redisZset = new DefaultRedisZSet>(key, this.initTemplate(jcf, new RedisTemplate>())); @@ -435,7 +434,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test(expected=IllegalStateException.class) @RedisAvailable public void testListWithMapKeyExpression() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisStoreWritingMessageHandler handler = new RedisStoreWritingMessageHandler(jcf); @@ -447,7 +446,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test(expected=IllegalStateException.class) @RedisAvailable public void testSetWithMapKeyExpression() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisStoreWritingMessageHandler handler = new RedisStoreWritingMessageHandler(jcf); @@ -460,7 +459,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test(expected=IllegalStateException.class) @RedisAvailable public void testZsetWithMapKeyExpression() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisStoreWritingMessageHandler handler = new RedisStoreWritingMessageHandler(jcf); @@ -473,7 +472,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testMapWithMapKeyExpression() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisStoreWritingMessageHandler handler = new RedisStoreWritingMessageHandler(jcf); @@ -491,7 +490,7 @@ public class RedisStoreWritingMessageHandlerTests extends RedisAvailableTests{ @Test @RedisAvailable public void testPropertiesWithMapKeyExpression() { - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); String key = "foo"; RedisStoreWritingMessageHandler handler = new RedisStoreWritingMessageHandler(jcf); diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/store-outbound-adapter.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/store-outbound-adapter.xml index d7f91458d4..2599b28c2b 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/store-outbound-adapter.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/store-outbound-adapter.xml @@ -61,8 +61,8 @@ map-key-expression="headers['baz']" collection-type="PROPERTIES"/> - - + + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableRule.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableRule.java index 8abd67ecd7..a3b6c6a6e3 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableRule.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -15,49 +15,71 @@ */ package org.springframework.integration.redis.rules; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.junit.Assume; import org.junit.rules.MethodRule; import org.junit.runners.model.FrameworkMethod; import org.junit.runners.model.Statement; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; + +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; /** * @author Oleg Zhurakousky * @author Gunnar Hillert - * + * @author Artem Bilan */ -public final class RedisAvailableRule implements MethodRule{ +public final class RedisAvailableRule implements MethodRule { - private static final Log logger = LogFactory.getLog(RedisAvailableRule.class); + public static final int REDIS_PORT = 6379; - public static final int REDIS_PORT = 7379; + static ThreadLocal connectionFactoryResource = new ThreadLocal(); public Statement apply(final Statement base, final FrameworkMethod method, Object target) { - return new Statement(){ + RedisAvailable redisAvailable = method.getAnnotation(RedisAvailable.class); + if (redisAvailable != null) { + LettuceConnectionFactory connectionFactory = null; + try { + connectionFactory = new LettuceConnectionFactory(); + connectionFactory.setPort(REDIS_PORT); + connectionFactory.afterPropertiesSet(); + connectionFactory.getConnection(); + connectionFactoryResource.set(connectionFactory); + } + catch (Exception e) { + if (connectionFactory != null) { + connectionFactory.destroy(); + } + return new Statement() { + @Override + public void evaluate() throws Throwable { + Assume.assumeTrue("Skipping test due to Redis not being available on port: " + REDIS_PORT, false); + } + }; + } - @Override - public void evaluate() throws Throwable { - RedisAvailable redisAvailable = method.getAnnotation(RedisAvailable.class); - if (redisAvailable != null){ + return new Statement() { + @Override + public void evaluate() throws Throwable { try { - - JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); - connectionFactory.setPort(REDIS_PORT); - connectionFactory.afterPropertiesSet(); - connectionFactory.getConnection(); - } catch (Exception e) { - if (logger.isWarnEnabled()) { - logger.warn(String.format("Redis is not available on " + - "port '%s'. Skipping the test.", REDIS_PORT)); + base.evaluate(); + } + finally { + LettuceConnectionFactory connectionFactory = connectionFactoryResource.get(); + connectionFactoryResource.remove(); + if (connectionFactory != null) { + connectionFactory.destroy(); } - return; } } + }; + } + + return new Statement() { + @Override + public void evaluate() throws Throwable { base.evaluate(); } }; - } } + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableTests.java index 3eb1d0bcb5..064f5cf3d7 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableTests.java @@ -21,7 +21,8 @@ import org.junit.Rule; import org.springframework.dao.DataAccessException; import org.springframework.data.redis.connection.RedisConnection; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; import org.springframework.data.redis.core.BoundListOperations; import org.springframework.data.redis.core.BoundZSetOperations; import org.springframework.data.redis.core.RedisCallback; @@ -31,21 +32,20 @@ import org.springframework.data.redis.core.StringRedisTemplate; /** * @author Oleg Zhurakousky * @author Gary Russell + * @author Artem Bilan * */ public class RedisAvailableTests { + @Rule public RedisAvailableRule redisAvailableRule = new RedisAvailableRule(); - @SuppressWarnings({ "rawtypes", "unchecked" }) - public JedisConnectionFactory getConnectionFactoryForTest(){ - JedisConnectionFactory jcf = new JedisConnectionFactory(); - jcf.setPort(7379); - jcf.afterPropertiesSet(); - RedisTemplate rt = new RedisTemplate(); - rt.setConnectionFactory(jcf); + public RedisConnectionFactory getConnectionFactoryForTest(){ + LettuceConnectionFactory connectionFactory = RedisAvailableRule.connectionFactoryResource.get(); + RedisTemplate rt = new RedisTemplate(); + rt.setConnectionFactory(connectionFactory); rt.afterPropertiesSet(); - rt.execute(new RedisCallback() { + rt.execute(new RedisCallback() { public Object doInRedis(RedisConnection connection) throws DataAccessException { @@ -53,13 +53,13 @@ public class RedisAvailableTests { return null; } }); - return jcf; + return connectionFactory; } - protected void prepareList(JedisConnectionFactory jcf){ + protected void prepareList(RedisConnectionFactory connectionFactory){ StringRedisTemplate redisTemplate = new StringRedisTemplate(); - redisTemplate.setConnectionFactory(jcf); + redisTemplate.setConnectionFactory(connectionFactory); redisTemplate.afterPropertiesSet(); BoundListOperations ops = redisTemplate.boundListOps("presidents"); @@ -80,10 +80,10 @@ public class RedisAvailableTests { ops.rightPush("George Washington"); } - protected void prepareZset(JedisConnectionFactory jcf){ + protected void prepareZset(RedisConnectionFactory connectionFactory){ StringRedisTemplate redisTemplate = new StringRedisTemplate(); - redisTemplate.setConnectionFactory(jcf); + redisTemplate.setConnectionFactory(connectionFactory); redisTemplate.afterPropertiesSet(); BoundZSetOperations ops = redisTemplate.boundZSetOps("presidents"); diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests-context.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests-context.xml index 00494293a3..a8c3317e1d 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests-context.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests-context.xml @@ -5,12 +5,8 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd"> - - - - - + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests.java index ad4d9123a1..7dcd7483e2 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests.java @@ -21,17 +21,20 @@ import static org.junit.Assert.fail; import java.util.concurrent.TimeUnit; +import org.junit.BeforeClass; import org.junit.Rule; import org.junit.Test; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; import org.springframework.integration.Message; import org.springframework.integration.MessageChannel; import org.springframework.integration.context.IntegrationContextUtils; import org.springframework.integration.core.PollableChannel; import org.springframework.integration.handler.DelayHandler; import org.springframework.integration.redis.rules.RedisAvailable; +import org.springframework.integration.redis.rules.RedisAvailableRule; import org.springframework.integration.redis.rules.RedisAvailableTests; import org.springframework.integration.store.MessageGroup; import org.springframework.integration.store.MessageGroupStore; @@ -47,9 +50,22 @@ public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTest public static final String DELAYER_ID = "delayerWithRedisMS"; + public static LettuceConnectionFactory connectionFactory; + @Rule public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest(); + @BeforeClass + public static void setup() { + connectionFactory = new LettuceConnectionFactory(); + connectionFactory.setPort(RedisAvailableRule.REDIS_PORT); + connectionFactory.afterPropertiesSet(); + } + + public static void tearDown() { + connectionFactory.destroy(); + } + @Test @RedisAvailable public void testDelayerHandlerRescheduleWithRedisMessageStore() throws Exception { diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageGroupStoreTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageGroupStoreTests.java index 99e2ee90c4..745ad1b646 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageGroupStoreTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageGroupStoreTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2007-2012 the original author or authors + * Copyright 2007-2013 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. @@ -29,13 +29,11 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import junit.framework.AssertionFailedError; - import org.junit.Ignore; import org.junit.Test; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.integration.Message; import org.springframework.integration.MessageChannel; import org.springframework.integration.channel.DirectChannel; @@ -48,6 +46,8 @@ import org.springframework.integration.store.MessageGroup; import org.springframework.integration.store.SimpleMessageGroup; import org.springframework.integration.support.MessageBuilder; +import junit.framework.AssertionFailedError; + /** * @author Oleg Zhurakousky * @@ -57,7 +57,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testNonExistingEmptyMessageGroup() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); MessageGroup messageGroup = store.getMessageGroup(1); @@ -69,7 +69,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testMessageGroupUpdatedDateChangesWithEachAddedMessage() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); MessageGroup messageGroup = store.getMessageGroup(1); @@ -96,7 +96,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testMessageGroupWithAddedMessage() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); MessageGroup messageGroup = store.getMessageGroup(1); @@ -114,7 +114,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testRemoveMessageGroup() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); MessageGroup messageGroup = store.getMessageGroup(1); @@ -141,7 +141,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testCompleteMessageGroup() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); MessageGroup messageGroup = store.getMessageGroup(1); @@ -155,7 +155,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testLastReleasedSequenceNumber() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); MessageGroup messageGroup = store.getMessageGroup(1); @@ -169,7 +169,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testRemoveMessageFromTheGroup() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); MessageGroup messageGroup = store.getMessageGroup(1); @@ -192,7 +192,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testWithMessageHistory() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); store.getMessageGroup(1); @@ -219,7 +219,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testRemoveNonExistingMessageFromTheGroup() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); MessageGroup messageGroup = store.getMessageGroup(1); @@ -230,7 +230,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testRemoveNonExistingMessageFromNonExistingTheGroup() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); store.removeMessageFromGroup(1, new GenericMessage("2")); } @@ -240,7 +240,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testMultipleInstancesOfGroupStore() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store1 = new RedisMessageStore(jcf); RedisMessageStore store2 = new RedisMessageStore(jcf); @@ -261,7 +261,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testIteratorOfMessageGroups() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store1 = new RedisMessageStore(jcf); RedisMessageStore store2 = new RedisMessageStore(jcf); @@ -303,7 +303,7 @@ public class RedisMessageGroupStoreTests extends RedisAvailableTests { @Test @RedisAvailable @Ignore public void testConcurrentModifications() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); final RedisMessageStore store1 = new RedisMessageStore(jcf); final RedisMessageStore store2 = new RedisMessageStore(jcf); diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageStoreTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageStoreTests.java index a8b76609af..22c3ee8959 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageStoreTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageStoreTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2007-2011 the original author or authors + * Copyright 2007-2013 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. @@ -15,13 +15,18 @@ */ package org.springframework.integration.redis.store; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertNull; + import java.io.Serializable; import java.util.Properties; import java.util.UUID; import org.junit.Test; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.integration.Message; import org.springframework.integration.channel.DirectChannel; import org.springframework.integration.history.MessageHistory; @@ -29,11 +34,6 @@ import org.springframework.integration.message.GenericMessage; import org.springframework.integration.redis.rules.RedisAvailable; import org.springframework.integration.redis.rules.RedisAvailableTests; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertNull; - /** * @author Oleg Zhurakousky * @@ -42,62 +42,62 @@ public class RedisMessageStoreTests extends RedisAvailableTests { @Test @RedisAvailable - public void testGetNonExistingMessage(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + public void testGetNonExistingMessage(){ + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); Message message = store.getMessage(UUID.randomUUID()); assertNull(message); } - + @Test @RedisAvailable - public void testGetMessageCountWhenEmpty(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + public void testGetMessageCountWhenEmpty(){ + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); assertEquals(0, store.getMessageCount()); } - + @Test @RedisAvailable - public void testAddStringMessage(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + public void testAddStringMessage(){ + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); Message stringMessage = new GenericMessage("Hello Redis"); Message storedMessage = store.addMessage(stringMessage); assertNotSame(stringMessage, storedMessage); assertEquals("Hello Redis", storedMessage.getPayload()); } - + @Test @RedisAvailable - public void testAddSerializableObjectMessage(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + public void testAddSerializableObjectMessage(){ + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); Address address = new Address(); address.setAddress("1600 Pennsylvania Av, Washington, DC"); Person person = new Person(address, "Barak Obama"); - + Message objectMessage = new GenericMessage(person); Message storedMessage = store.addMessage(objectMessage); assertNotSame(objectMessage, storedMessage); assertEquals("Barak Obama", storedMessage.getPayload().getName()); } - + @Test(expected=IllegalArgumentException.class) @RedisAvailable - public void testAddNonSerializableObjectMessage(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + public void testAddNonSerializableObjectMessage(){ + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); - + Message objectMessage = new GenericMessage(new Foo()); store.addMessage(objectMessage); } - + @SuppressWarnings("unchecked") @Test @RedisAvailable - public void testAddAndGetStringMessage(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + public void testAddAndGetStringMessage(){ + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); Message stringMessage = new GenericMessage("Hello Redis"); store.addMessage(stringMessage); @@ -108,8 +108,8 @@ public class RedisMessageStoreTests extends RedisAvailableTests { @SuppressWarnings("unchecked") @Test @RedisAvailable - public void testAddAndRemoveStringMessage(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + public void testAddAndRemoveStringMessage(){ + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); Message stringMessage = new GenericMessage("Hello Redis"); store.addMessage(stringMessage); @@ -118,19 +118,19 @@ public class RedisMessageStoreTests extends RedisAvailableTests { assertEquals("Hello Redis", retrievedMessage.getPayload()); assertNull(store.getMessage(stringMessage.getHeaders().getId())); } - + @Test @RedisAvailable - public void testWithMessageHistory() throws Exception{ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + public void testWithMessageHistory() throws Exception{ + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMessageStore store = new RedisMessageStore(jcf); - + Message message = new GenericMessage("Hello"); DirectChannel fooChannel = new DirectChannel(); fooChannel.setBeanName("fooChannel"); DirectChannel barChannel = new DirectChannel(); barChannel.setBeanName("barChannel"); - + message = MessageHistory.write(message, fooChannel); message = MessageHistory.write(message, barChannel); store.addMessage(message); @@ -142,7 +142,7 @@ public class RedisMessageStoreTests extends RedisAvailableTests { assertEquals("fooChannel", fooChannelHistory.get("name")); assertEquals("channel", fooChannelHistory.get("type")); } - + @SuppressWarnings("serial") public static class Person implements Serializable{ private Address address; @@ -176,8 +176,8 @@ public class RedisMessageStoreTests extends RedisAvailableTests { this.address = address; } } - + public static class Foo{ - + } } diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/metadata/RedisMetadataStoreTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/metadata/RedisMetadataStoreTests.java index c19191bdb1..2e57b9c1b2 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/metadata/RedisMetadataStoreTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/metadata/RedisMetadataStoreTests.java @@ -20,7 +20,8 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import org.junit.Test; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; + +import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.core.BoundValueOperations; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.integration.redis.rules.RedisAvailable; @@ -36,7 +37,7 @@ public class RedisMetadataStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testGetNonExistingKeyValue(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMetadataStore metadataStore = new RedisMetadataStore(jcf); String retrievedValue = metadataStore.get("does-not-exist"); assertNull(retrievedValue); @@ -45,7 +46,7 @@ public class RedisMetadataStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testPersistKeyValue(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMetadataStore metadataStore = new RedisMetadataStore(jcf); metadataStore.put("RedisMetadataStoreTests-Spring", "Integration"); @@ -59,7 +60,7 @@ public class RedisMetadataStoreTests extends RedisAvailableTests { @RedisAvailable public void testGetValueFromMetadataStore(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMetadataStore metadataStore = new RedisMetadataStore(jcf); metadataStore.put("RedisMetadataStoreTests-GetValue", "Hello Redis"); @@ -71,7 +72,7 @@ public class RedisMetadataStoreTests extends RedisAvailableTests { @RedisAvailable public void testPersistEmptyStringToMetadataStore(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMetadataStore metadataStore = new RedisMetadataStore(jcf); metadataStore.put("RedisMetadataStoreTests-PersistEmpty", ""); @@ -83,7 +84,7 @@ public class RedisMetadataStoreTests extends RedisAvailableTests { @RedisAvailable public void testPersistNullStringToMetadataStore(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMetadataStore metadataStore = new RedisMetadataStore(jcf); try { @@ -101,7 +102,7 @@ public class RedisMetadataStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testPersistWithEmptyKeyToMetadataStore(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMetadataStore metadataStore = new RedisMetadataStore(jcf); metadataStore.put("", "PersistWithEmptyKey"); @@ -112,7 +113,7 @@ public class RedisMetadataStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testPersistWithNullKeyToMetadataStore(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMetadataStore metadataStore = new RedisMetadataStore(jcf); try { @@ -129,7 +130,7 @@ public class RedisMetadataStoreTests extends RedisAvailableTests { @Test @RedisAvailable public void testGetValueWithNullKeyFromMetadataStore(){ - JedisConnectionFactory jcf = this.getConnectionFactoryForTest(); + RedisConnectionFactory jcf = this.getConnectionFactoryForTest(); RedisMetadataStore metadataStore = new RedisMetadataStore(jcf); try { diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/redis-aggregator-config.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/redis-aggregator-config.xml index dd653cc2d5..f6a57d6ca3 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/redis-aggregator-config.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/redis-aggregator-config.xml @@ -4,19 +4,19 @@ xmlns:int="http://www.springframework.org/schema/integration" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd"> - + - + - + - - - + + + diff --git a/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceWithRedisTests-context.xml b/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceWithRedisTests-context.xml index ff71c8a29a..1dcc01831e 100644 --- a/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceWithRedisTests-context.xml +++ b/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceWithRedisTests-context.xml @@ -25,9 +25,10 @@ - + +