chstercc opened a new pull request, #6946: URL: https://github.com/apache/rocketmq-dashboard/pull/6946
### Which Issue(s) This PR Fixes - Fixes #6638 ### Brief Description `dlq_check.sh` treated HTTP/code 200 plus a growing consumer log as success. The resend endpoint also answers 200 for `PARTIAL` and `scanIncomplete` results, and a `SUCCESS` can describe fewer than the three messages this regression sends — so all three incomplete outcomes printed PASS. The script now requires a complete `SUCCESS` (`matched=3`, `resent=3`, `failed=0`, `scanIncomplete=false`, `failedQueueCount=0`) before it runs the consumer check. A failed verdict exits non-zero and the existing EXIT trap still performs cleanup. Added `dlq_check_test.sh`, which stubs `ssh`/`scp`/`sleep`/`python3` and exercises the original shell/Python flow for five cases: complete success, `PARTIAL`, `scanIncomplete`, a two-message `SUCCESS`, and a consumer that does not receive the resend again. Every case also asserts that the EXIT cleanup ran. ### How Did You Test This Change? - `bash .claude/skills/regression-rocketmq/scripts/dlq_check_test.sh` — all five cases pass. With the production fix stashed, the `partial`, `scan-incomplete` and `short-success` cases fail with `expected exit 1, got 0`, reproducing the three false PASS verdicts from the issue. - `bash -n` on both scripts — syntax OK. - No Broker, SSH host or real Studio endpoint is touched: the harness stubs `ssh`, `scp`, `sleep` and `python3`, and drives the script's own heredoc snippets with fixture responses. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits (`fix:`) - [x] Tests added or updated for non-trivial changes - [x] New UI text has both Chinese and English entries under `web/src/i18n/` (no UI text) - [x] Architecture constraints stay green (script-only change) - [x] New source files carry the ASF license header (`dlq_check_test.sh`) - [x] Documentation touched where behaviour changed (the script's own comments describe the new verdict) -- 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]
