Skip to content

Commit a749fae

Browse files
committed
Fixed credentials
1 parent 5540e10 commit a749fae

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ benchmark.key.data=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
3434
## Usage
3535
Run the command with the parameters below to test connectivity to REDIS, and also generate the keys for executing **GET** benchmarks:
3636
```bash
37-
java -DREDIS_BENCHMARK_CONFIG=benchmark.properties -jar redis-benchmark.jar -wi 1 -i 1 -t 1 -f 0
37+
java -DREDIS_BENCHMARK_CONFIG=benchmark.properties -jar redis-benchmark.jar -wi 1 -i 1 -t 1 -f 1
3838
```
3939
<details><summary>Expected output:</summary>
4040
<p>

src/main/java/com/redis/benchmark/utils/BenchmarkConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ public String getConnectionCircuitBreakerFailureRateThreshold() {
6969

7070
public String getRedisUser() {
7171
Properties properties = getProperties();
72-
return properties.getProperty("redis.user", "default");
72+
return properties.getProperty("redis.user");
7373
}
7474

7575
public String getRedisPassword() {
7676
Properties properties = getProperties();
77-
return properties.getProperty("redis.password", "");
77+
return properties.getProperty("redis.password");
7878
}
7979

8080
String getKeyContentData() {

src/main/java/com/redis/benchmark/utils/JedisConnectionManagement.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,10 @@ private void createJedisConnection() {
2424
Set<HostAndPort> hostAndPorts = BenchmarkConfiguration.get().getRedisHostAndPorts();
2525
int index = 0;
2626

27-
String user = BenchmarkConfiguration.get().getRedisUser();
28-
if (user != null && !user.isEmpty())
29-
user = BenchmarkConfiguration.get().getRedisUser();
30-
31-
String password = BenchmarkConfiguration.get().getRedisPassword();
32-
if (password != null && !password.isEmpty())
33-
password = BenchmarkConfiguration.get().getRedisPassword();
34-
3527
try {
3628
JedisClientConfig jedisClientConfig = DefaultJedisClientConfig.builder()
37-
.user(user)
38-
.password(password)
29+
.user(BenchmarkConfiguration.get().getRedisUser())
30+
.password(BenchmarkConfiguration.get().getRedisPassword())
3931
.clientName("RedisBenchmark")
4032
.build();
4133

0 commit comments

Comments
 (0)