DATAREDIS-575 - Add tests for client name with JedisCluster.
Original pull request: #464.
This commit is contained in:
@@ -23,6 +23,7 @@ import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.data.redis.SettingsUtils;
|
||||
import org.springframework.data.redis.connection.RedisConnection;
|
||||
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
|
||||
|
||||
/**
|
||||
@@ -65,4 +66,17 @@ public class JedisConnectionFactoryIntegrationTests {
|
||||
|
||||
assertThat(factory.getConnection().ping()).isEqualTo("PONG");
|
||||
}
|
||||
|
||||
@Test // DATAREDIS-575
|
||||
public void connectionAppliesClientName() {
|
||||
|
||||
factory = new JedisConnectionFactory(
|
||||
new RedisStandaloneConfiguration(SettingsUtils.getHost(), SettingsUtils.getPort()),
|
||||
JedisClientConfiguration.builder().clientName("clientName").build());
|
||||
factory.afterPropertiesSet();
|
||||
|
||||
RedisConnection connection = factory.getConnection();
|
||||
|
||||
assertThat(connection.getClientName(), equalTo("clientName"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user