Skip to content

Commit

Permalink
Fixed credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
viragtripathi committed Mar 29, 2023
1 parent 5540e10 commit a749fae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ benchmark.key.data=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
## Usage
Run the command with the parameters below to test connectivity to REDIS, and also generate the keys for executing **GET** benchmarks:
```bash
java -DREDIS_BENCHMARK_CONFIG=benchmark.properties -jar redis-benchmark.jar -wi 1 -i 1 -t 1 -f 0
java -DREDIS_BENCHMARK_CONFIG=benchmark.properties -jar redis-benchmark.jar -wi 1 -i 1 -t 1 -f 1
```
<details><summary>Expected output:</summary>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ public String getConnectionCircuitBreakerFailureRateThreshold() {

public String getRedisUser() {
Properties properties = getProperties();
return properties.getProperty("redis.user", "default");
return properties.getProperty("redis.user");
}

public String getRedisPassword() {
Properties properties = getProperties();
return properties.getProperty("redis.password", "");
return properties.getProperty("redis.password");
}

String getKeyContentData() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@ private void createJedisConnection() {
Set<HostAndPort> hostAndPorts = BenchmarkConfiguration.get().getRedisHostAndPorts();
int index = 0;

String user = BenchmarkConfiguration.get().getRedisUser();
if (user != null && !user.isEmpty())
user = BenchmarkConfiguration.get().getRedisUser();

String password = BenchmarkConfiguration.get().getRedisPassword();
if (password != null && !password.isEmpty())
password = BenchmarkConfiguration.get().getRedisPassword();

try {
JedisClientConfig jedisClientConfig = DefaultJedisClientConfig.builder()
.user(user)
.password(password)
.user(BenchmarkConfiguration.get().getRedisUser())
.password(BenchmarkConfiguration.get().getRedisPassword())
.clientName("RedisBenchmark")
.build();

Expand Down

0 comments on commit a749fae

Please sign in to comment.