123123213weqw opened a new pull request, #6371: URL: https://github.com/apache/rocketmq-dashboard/pull/6371
Supersedes #6136, folded per the salvage path in the review there (reopening the old PR was refused by GitHub, hence the new one). ## What `TestYAMLRestoresJSONNumbersTest` in `rmqctl/internal/output/output_test.go` already pins that `json.Number` leaves render unquoted in YAML and keep exact digits beyond 2^53. What it did not observe was the other end of the contract: a consumer decoding the rendered YAML must read the types back — integers as integers (never bent through a float64), floats as floats. ## The change - The round-trip decode assertions from #6136 now live inside the existing test instead of a second, near-duplicate file: `yaml.Unmarshal` on the rendered output, then `skippedCount` as `int 5`, `size` as `int 3`, `ratio` as `float64 0.25`, and `offset` accepted as `int`/`int64`/`uint64` — always exactly `9007199254740993` (2^53+1). Dropping `restoreNumbers` still trips the render assertions; re-introducing a float64 anywhere in the path now trips the decode ones too. - The near-duplicate `yaml_numbers_test.go` from #6136 is deleted; one test owns the whole contract. - Blank line between the ASF license header and `package output`, matching the neighbouring files. - Branch also merged onto the current `rocketmq-studio` (no conflicts); `go test ./internal/output/` is green. -- 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]
