Skip to content

Commit

Permalink
Added debug output to logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mp911de committed Jun 21, 2014
1 parent 6a6f10e commit dae9f0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package com.lambdaworks.redis;

import org.apache.log4j.Logger;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
Expand All @@ -19,6 +20,7 @@ public abstract class AbstractCommandTest {
public static final String passwd = "passwd";

protected static RedisClient client;
protected Logger log = Logger.getLogger(getClass());
protected RedisConnection<String, String> redis;
protected String key = "key";
protected String value = "value";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ public void clientPause() throws Exception {

@Test
public void clientKill() throws Exception {
Pattern p = Pattern.compile("addr=(\\S+)");
Matcher m = p.matcher(redis.clientList());
Pattern p = Pattern.compile("addr=([^ ]+)");
String clients = redis.clientList();
Matcher m = p.matcher(clients);

log.info("Client List: " + clients);
assertTrue(m.lookingAt());
assertEquals("OK", redis.clientKill(m.group(1)));
}
Expand Down

0 comments on commit dae9f0b

Please sign in to comment.