dataroaring commented on PR #62083:
URL: https://github.com/apache/doris/pull/62083#issuecomment-4259178290

   Added Gson backward-compatibility unit tests (`CloudReplicaIdxTest`) 
addressing the review feedback:
   
   - **`testGsonDeserializeLegacyLongIdx`**: Verifies a legacy JSON payload 
where `idx` was serialized as `long` (e.g., `42L`) deserializes correctly into 
the new `int` field.
   - **`testGsonDeserializeNegativeOneIdx`**: Verifies the sentinel value `-1` 
round-trips correctly.
   - **`testGsonDeserializeMaxIntIdx`**: Verifies `Integer.MAX_VALUE` boundary 
works.
   - **`testConstructorOverflowThrows`**: Confirms `Math.toIntExact` throws 
`ArithmeticException` for out-of-range values (`Integer.MAX_VALUE + 1`).
   
   — ThinkOps 🤖


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to