Copilot commented on code in PR #3786:
URL: https://github.com/apache/fory/pull/3786#discussion_r3468899819
##########
java/fory-core/src/test/java/org/apache/fory/serializer/collection/CollectionSerializersTest.java:
##########
@@ -1153,6 +1153,13 @@ public void testSerializeJavaBlockingQueue() {
assertEquals(new ArrayList<>(deserialized), new ArrayList<>(queue));
assertEquals(deserialized.remainingCapacity() + deserialized.size(), 3);
}
+ {
+ LinkedBlockingQueue<Integer> queue = new LinkedBlockingQueue<>();
+ queue.add(1);
+ queue.add(2);
+ LinkedBlockingQueue<Integer> deserialized = serDe(fory, queue);
+ assertEquals(new ArrayList<>(deserialized), new ArrayList<>(queue));
+ }
Review Comment:
The regression test for the default (effectively unbounded)
`LinkedBlockingQueue` only verifies element round-trip. Since this serializer
is specifically responsible for preserving queue capacity, it would be good to
also assert the deserialized queue keeps the `Integer.MAX_VALUE` capacity (via
`remainingCapacity() + size()`). This strengthens the regression by ensuring we
still exercise the large-capacity case that previously triggered the failure.
--
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]