Search in sources :

Example 46 with RedisConnectionFactory

use of org.springframework.data.redis.connection.RedisConnectionFactory in project jetcache by alibaba.

the class RedisSpringDataCacheTest method jedisTest.

@Test
public void jedisTest() throws Exception {
    RedisConnectionFactory connectionFactory = new JedisConnectionFactory();
    doTest(connectionFactory);
}
Also used : JedisConnectionFactory(org.springframework.data.redis.connection.jedis.JedisConnectionFactory) RedisConnectionFactory(org.springframework.data.redis.connection.RedisConnectionFactory) LoadingCacheTest(com.alicp.jetcache.LoadingCacheTest) RefreshCacheTest(com.alicp.jetcache.RefreshCacheTest) AbstractExternalCacheTest(com.alicp.jetcache.test.external.AbstractExternalCacheTest) Test(org.junit.Test)

Example 47 with RedisConnectionFactory

use of org.springframework.data.redis.connection.RedisConnectionFactory in project spring-cloud-connectors by spring-cloud.

the class RedisConnectionFactoryXmlConfigTest method cloudRedisConnectionFactoryWithMaxPool.

@Test
public void cloudRedisConnectionFactoryWithMaxPool() {
    ApplicationContext testContext = getTestApplicationContext("cloud-redis-with-config.xml", createService("my-service"));
    RedisConnectionFactory connector = testContext.getBean("service-pool20-wait200", getConnectorType());
    RedisConnectionFactoryCloudConfigTestHelper.assertPoolProperties(connector, 20, 0, 200);
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) RedisConnectionFactory(org.springframework.data.redis.connection.RedisConnectionFactory) Test(org.junit.Test)

Example 48 with RedisConnectionFactory

use of org.springframework.data.redis.connection.RedisConnectionFactory in project spring-cloud-connectors by spring-cloud.

the class RedisConnectionFactoryConfigWithServiceConfig method cloudRedisConnectionFactoryWithMaxPool.

@Test
public void cloudRedisConnectionFactoryWithMaxPool() {
    ApplicationContext testContext = getTestApplicationContext(RedisConnectionFactoryConfigWithServiceConfig.class, createService("my-service"));
    RedisConnectionFactory connector = testContext.getBean("pool20Wait200", getConnectorType());
    RedisConnectionFactoryCloudConfigTestHelper.assertPoolProperties(connector, 20, 0, 200);
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) RedisConnectionFactory(org.springframework.data.redis.connection.RedisConnectionFactory) Test(org.junit.Test)

Example 49 with RedisConnectionFactory

use of org.springframework.data.redis.connection.RedisConnectionFactory in project spring-cloud-connectors by spring-cloud.

the class RedisConnectionFactoryConfigWithServiceConfig method cloudRedisConnectionFactoryWithNoPool.

@Test
public void cloudRedisConnectionFactoryWithNoPool() {
    ApplicationContext testContext = getTestApplicationContext(RedisConnectionFactoryConfigWithServiceConfig.class, createService("my-service"));
    RedisConnectionFactory connector = testContext.getBean("noPool", getConnectorType());
    RedisConnectionFactoryCloudConfigTestHelper.assertNoPoolProperties(connector);
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) RedisConnectionFactory(org.springframework.data.redis.connection.RedisConnectionFactory) Test(org.junit.Test)

Example 50 with RedisConnectionFactory

use of org.springframework.data.redis.connection.RedisConnectionFactory in project spring-cloud-connectors by spring-cloud.

the class RedisServiceConnectorCreatorTest method cloudRedisCreationSecureConnection.

@Test
public void cloudRedisCreationSecureConnection() {
    RedisServiceInfo serviceInfo = createServiceInfo(RedisServiceInfo.REDISS_SCHEME);
    RedisConnectionFactory dataSource = testCreator.create(serviceInfo, null);
    assertConnectorProperties(serviceInfo, dataSource, true);
}
Also used : RedisServiceInfo(org.springframework.cloud.service.common.RedisServiceInfo) RedisConnectionFactory(org.springframework.data.redis.connection.RedisConnectionFactory) Test(org.junit.Test)

Aggregations

RedisConnectionFactory (org.springframework.data.redis.connection.RedisConnectionFactory)95 Test (org.junit.Test)83 RedisAvailable (org.springframework.integration.redis.rules.RedisAvailable)62 GenericMessage (org.springframework.messaging.support.GenericMessage)22 BeanFactory (org.springframework.beans.factory.BeanFactory)19 StringRedisTemplate (org.springframework.data.redis.core.StringRedisTemplate)17 MessageGroup (org.springframework.integration.store.MessageGroup)14 SimpleMessageGroup (org.springframework.integration.store.SimpleMessageGroup)13 ArrayList (java.util.ArrayList)12 Message (org.springframework.messaging.Message)10 Properties (java.util.Properties)9 ApplicationContext (org.springframework.context.ApplicationContext)9 List (java.util.List)8 DefaultRedisList (org.springframework.data.redis.support.collections.DefaultRedisList)8 RedisList (org.springframework.data.redis.support.collections.RedisList)8 RedisConnection (org.springframework.data.redis.connection.RedisConnection)7 DefaultRedisZSet (org.springframework.data.redis.support.collections.DefaultRedisZSet)7 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)6 TypedTuple (org.springframework.data.redis.core.ZSetOperations.TypedTuple)6 LiteralExpression (org.springframework.expression.common.LiteralExpression)6