lizhimins commented on PR #6371:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/6371#issuecomment-6190300258

   Closing in favour of #6439, which is now merged into `rocketmq-studio` as 
`eeaa90b91`. Thanks for folding this into the existing test instead of a second 
file — that part of the #6136 salvage path is exactly right, and the ASF-header 
blank line matches the neighbours. Closing this one anyway, because the added 
decode block does not increase coverage: `output_test.go:45` already pins the 
rendered text of all four scalars (`size: 3`, `ratio: 0.25`, `skippedCount: 5`, 
`offset: 9007199254740993`) and `:50` pins that none of them is quoted, and 
`yaml.Unmarshal` is a deterministic function of that text. Any mutation the 
decode block could catch (e.g. routing an integer through float64) changes the 
rendered literal first, so the render assertions already go red — as your own 
note concedes. The `int`/`int64`/`uint64` type switch also asserts a property 
of yaml.v3 rather than of `restoreNumbers` (`output.go:61-70`). Salvage path if 
you want decode-side coverage to be worth carrying: as
 sert on values whose rendered text is *not* already pinned — that is precisely 
what #6439 and #6490 do for literals outside int64/float64 range 
(`18446744073709551615`, `-9223372036854775809`, `1e400`, and the `!!int` tag 
yaml.v3 emits for the one value it cannot resolve back into a Go int). Folding 
a decode assertion into either of those tests would give the round-trip 
contract a mutation-sensitive owner; this file's existing test already owns the 
render half.


-- 
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]

Reply via email to