zjncs opened a new issue, #5592: URL: https://github.com/apache/rocketmq-dashboard/issues/5592
`web/src/services/messageService.ts` (branch rocketmq-studio) — `listDLQGroups` (lines ~119-138) and `listDLQMessages` (~167-179) mocks validate nothing: - **page 0 / negative** becomes a negative JS slice index (`from = Math.min((page-1)*pageSize, len)`), so `page=-1, pageSize=1` returns rows sliced from the END of the list — wrong data - **pageSize 101+** is silently accepted; `listDLQMessages` returns an empty page for any invalid params The backend rejects all of these with 400: `DLQService.java:35,41-48` (`MAX_PAGE_SIZE=100`, `"Invalid page or pageSize"`) for group listing and `DLQController.java:90-94` (`@Min(1)` page, `@Min(1) @Max(100)` pageSize) for message listing. Mock tests therefore pass against inputs the real backend always rejects, and mock consumers see junk rows for negative pages. The sibling mock `queryMessagePage` (messageService.ts:57-77) already mirrors its backend validation exactly — these two branches were missed. Same family as merged #5498 (aclService pagination contract). main @ rocketmq-studio tip. -- 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]
