DATAREDIS-269 - Add support for 'CLIENT SETNAME'.
Setting client name is possible for 'jedis', 'lettuce' and 'srp'. Using 'jredis' throws 'UnspupportedOperationException'. Original Pull Request: #54
This commit is contained in:
committed by
Thomas Darimont
parent
6a6d03eb4c
commit
e280a23550
@@ -1884,6 +1884,14 @@ public abstract class AbstractConnectionIntegrationTests {
|
||||
assertThat(time > 0, equalTo(true));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATAREDIS-269
|
||||
*/
|
||||
@Test
|
||||
public void clientSetNameWorksCorrectly() {
|
||||
connection.setClientName("foo".getBytes());
|
||||
}
|
||||
|
||||
protected void verifyResults(List<Object> expected) {
|
||||
assertEquals(expected, getResults());
|
||||
}
|
||||
|
||||
@@ -1710,6 +1710,16 @@ public class DefaultStringRedisConnectionTests {
|
||||
verify(nativeConnection, times(1)).shutdown(eq(ShutdownOption.NOSAVE));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATAREDIS-269
|
||||
*/
|
||||
@Test
|
||||
public void settingClientNameShouldDelegateToNativeConnection() {
|
||||
|
||||
connection.setClientName("foo");
|
||||
verify(nativeConnection, times(1)).setClientName(eq("foo".getBytes()));
|
||||
}
|
||||
|
||||
protected List<Object> getResults() {
|
||||
return actual;
|
||||
}
|
||||
|
||||
@@ -246,4 +246,12 @@ public class JedisConnectionPipelineIntegrationTests extends AbstractConnectionP
|
||||
public void testZAddMultiple() {
|
||||
super.testZAddMultiple();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATAREDIS-269
|
||||
*/
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
public void clientSetNameWorksCorrectly() {
|
||||
super.clientSetNameWorksCorrectly();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,4 +191,13 @@ public class JedisConnectionTransactionIntegrationTests extends AbstractConnecti
|
||||
public void testRestoreExistingKey() {
|
||||
super.testRestoreExistingKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATAREDIS-269
|
||||
*/
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
public void clientSetNameWorksCorrectly() {
|
||||
super.clientSetNameWorksCorrectly();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -809,4 +809,13 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
|
||||
public void testPsetEx() throws Exception {
|
||||
super.testPsetEx();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATAREDIS-269
|
||||
*/
|
||||
@Override
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
public void clientSetNameWorksCorrectly() {
|
||||
super.clientSetNameWorksCorrectly();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user