Skip to content

Commit

Permalink
init sentinel test; fixed cluster test so that we don't attempt to re…
Browse files Browse the repository at this point in the history
…turn the connection twice; same for server test; added missing common-logging dependency; updated jedis and spring data versions
  • Loading branch information
turu committed Jan 22, 2015
1 parent 98c124f commit 2bf4aec
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
11 changes: 8 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,16 @@
</distributionManagement>

<dependencies>

<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.1.0</version>
<version>2.6.0</version>
<scope>test</scope>
</dependency>

Expand All @@ -75,7 +80,7 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.1.0.RELEASE</version>
<version>1.4.1.RELEASE</version>
<scope>test</scope>
</dependency>

Expand Down
17 changes: 17 additions & 0 deletions src/test/java/redis/embedded/RedisSentinelTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package redis.embedded;

import org.junit.After;
import org.junit.Before;

public class RedisSentinelTest {

@Before
public void setUp() throws Exception {

}

@After
public void tearDown() throws Exception {

}
}
1 change: 0 additions & 1 deletion src/test/java/redis/embedded/RedisServerClusterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public void testSimpleOperationsAfterRun() throws Exception {
assertEquals("1", jedis.mget("abc").get(0));
assertEquals("2", jedis.mget("def").get(0));
assertEquals(null, jedis.mget("xyz").get(0));
pool.returnResource(jedis);
} finally {
if (jedis != null)
pool.returnResource(jedis);
Expand Down
8 changes: 2 additions & 6 deletions src/test/java/redis/embedded/RedisServerTest.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package redis.embedded;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

import static org.junit.Assert.*;

public class RedisServerTest {

private RedisServer redisServer;
Expand Down Expand Up @@ -60,7 +57,6 @@ public void testSimpleOperationsAfterRun() throws Exception {
assertEquals("1", jedis.mget("abc").get(0));
assertEquals("2", jedis.mget("def").get(0));
assertEquals(null, jedis.mget("xyz").get(0));
pool.returnResource(jedis);
} finally {
if (jedis != null)
pool.returnResource(jedis);
Expand Down

0 comments on commit 2bf4aec

Please sign in to comment.