Fix broken test due to missing authent

This commit is contained in:
Yaourt
2011-09-16 17:22:59 +02:00
parent b7ee1fe29a
commit fd0c57599c

View File

@@ -24,18 +24,25 @@ public class SharedJedisPipelineTest {
@Before
public void setUp() throws Exception {
Jedis jedis = new Jedis(redis1.host, redis1.port);
jedis.auth("foobared");
jedis.flushAll();
jedis.disconnect();
jedis = new Jedis(redis2.host, redis2.port);
jedis.auth("foobared");
jedis.flushAll();
jedis.disconnect();
List<JedisShardInfo> shards = new ArrayList<JedisShardInfo>();
shards.add(new JedisShardInfo(redis1.host, redis1.port));
shards.add(new JedisShardInfo(redis2.host, redis2.port));
JedisShardInfo si1 = new JedisShardInfo(redis1.host, redis1.port);
si1.setPassword("foobared");
shards.add(si1);
JedisShardInfo si2 = new JedisShardInfo(redis2.host, redis2.port);
si2.setPassword("foobared");
shards.add(si2);
this.jedis = new ShardedJedis(shards);
}
@Test
public void pipeline() throws UnsupportedEncodingException {
ShardedJedisPipeline p = jedis.pipelined();