Skip to content

Commit 459d27b

Browse files
authored
[ISSUE #10191] Fix wrong option value for namesrvAddr parsing in timer benchmark examples (#10192)
1 parent 3b12a25 commit 459d27b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerConsumer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public TimerConsumer(String[] args) {
5656
System.exit(-1);
5757
}
5858

59-
final String namesrvAddr = commandLine.hasOption('n') ? commandLine.getOptionValue('t').trim() : "localhost:9876";
59+
final String namesrvAddr = commandLine.hasOption('n') ? commandLine.getOptionValue('n').trim() : "localhost:9876";
6060
topic = commandLine.hasOption('t') ? commandLine.getOptionValue('t').trim() : "BenchmarkTest";
6161
System.out.printf("namesrvAddr: %s, topic: %s%n", namesrvAddr, topic);
6262

example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerProducer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public TimerProducer(String[] args) {
7474
System.exit(-1);
7575
}
7676

77-
final String namesrvAddr = commandLine.hasOption('n') ? commandLine.getOptionValue('t').trim() : "localhost:9876";
77+
final String namesrvAddr = commandLine.hasOption('n') ? commandLine.getOptionValue('n').trim() : "localhost:9876";
7878
topic = commandLine.hasOption('t') ? commandLine.getOptionValue('t').trim() : "BenchmarkTest";
7979
threadCount = commandLine.hasOption("tc") ? Integer.parseInt(commandLine.getOptionValue("tc")) : 16;
8080
messageSize = commandLine.hasOption("ms") ? Integer.parseInt(commandLine.getOptionValue("ms")) : 1024;

0 commit comments

Comments
 (0)