Add connection integration tests

- Add tests for all Connection methods

- Add tests for all Connection methods through pipeline

- Clean up DB between Connection test runs

- Reduce sleeps in pub/sub tests to improve execution time
This commit is contained in:
Jennifer Hickey
2013-03-28 18:27:47 -07:00
parent b518fa16bf
commit a1fb8aad69
18 changed files with 3178 additions and 251 deletions

View File

@@ -4,10 +4,10 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- We can't pool connections for this test because Jedis leaves OutputSteam
in compromised state on NullPointerException (which happens if a null key
or value is used) but doesn't remove them from the pool or reconnect them
on next attempted use -->
<!-- DATAREDIS-153 We can't pool connections for this test because Jedis
leaves OutputSteam in compromised state on NullPointerException (which happens
if a null key or value is used) but doesn't remove them from the pool or
reconnect them on next attempted use -->
<bean id="jedisConnectionFactory "
class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
p:usePool="false">

View File

@@ -3,9 +3,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- We can't pool connections for this test because JRedis closes connections
on Exception but doesn't remove them from the pool or reconnect them on next
attempted use -->
<!-- DATAREDIS-154 We can't pool connections for this test because JRedis
closes connections on Exception but doesn't remove them from the pool or
reconnect them on next attempted use -->
<bean id="jredisConnectionFactory "
class="org.springframework.data.redis.connection.jredis.JredisConnectionFactory"
p:usePool="false">

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="rjcConnectionFactory "
class="org.springframework.data.redis.connection.rjc.RjcConnectionFactory">
<property name="hostName">
<bean class="org.springframework.data.redis.SettingsUtils"
factory-method="getHost" />
</property>
<property name="port">
<bean class="org.springframework.data.redis.SettingsUtils"
factory-method="getPort" />
</property>
</bean>
</beans>