lizhimins commented on PR #6136:
URL:
https://github.com/apache/rocketmq-dashboard/pull/6136#issuecomment-6120328151
Thanks for the test, but the premise it rests on is not accurate against the
current `rocketmq-studio` baseline. `restoreNumbers` is already pinned by
`TestYAMLRestoresJSONNumbersTest` at
`rmqctl/internal/output/output_test.go:26-55`, added by `53c1f9980` (#6057) —
which is an ancestor of this PR's own merge base (`5e4c39b05`). That test
already asserts, for the same `2^53+1` constant `9007199254740993`: - unquoted
rendering of `size: 3`, `ratio: 0.25`, `skippedCount: 5`, `offset:
9007199254740993` (`output_test.go:45-49`); - that none of them is quoted
(`output_test.go:50-54`); - that floats stay floats (`ratio: 0.25`); - that
nested maps and slices are walked — its payload is `items:
[]any{map[string]any{...}}` with the leaves two levels down
(`output_test.go:28-37`). So all four guarantees listed in your description are
covered, and the regressions you are worried about are already caught: dropping
`restoreNumbers` turns the output into `size: "3"` and trips `output_test.go
:50-54`; switching to float64-first parsing renders `offset` as
`9.007199254740993e+15` and trips `output_test.go:45`. The genuinely new part
here is the decode-side type assertions (`decoded["offset"].(int)` and
friends), which observe the same guarantee from the other end and add no
mutation the existing test would miss. Closing as already covered. Salvage path
if you would like to contribute the increment: fold the round-trip decode
assertions into `TestYAMLRestoresJSONNumbersTest` rather than adding a second,
near-duplicate test file — that keeps one test owning one contract. If you do,
please also add a blank line between the ASF license header and `package
output` to match the neighbouring files.
--
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]