zjncs opened a new pull request, #11131:
URL: https://github.com/apache/rocketmq/pull/11131
### Motivation
`exportPopRecordCommand` built its dry-run flag as
```java
Boolean.FALSE.toString().equalsIgnoreCase(commandLine.getOptionValue('d'));
```
so the command ran in dry-run mode only when `-d` was literally `false` —
exactly inverted. `mqadmin exportPopRecord -d true` (explicitly requesting no
changes) actually sent the mutating `POP_ROLLBACK` request, while `-d false`
skipped the rollback and only exported the records.
### Modifications
Parse the flag with `Boolean.parseBoolean` so the command honors the
documented semantics.
### Verification
Fail-before (new test, run against the unpatched code):
```
ExportPopRecordCommandTest#testNonDryRunExportsRecords
java.lang.AssertionError (message is the captured console output): with -d
false the inverted
flag printed dryRun=true and skipped the export instead of attempting it
```
Pass-after:
```
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 --
ExportPopRecordCommandTest
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]