RFR[8240901]: 'Add a test to check that large datagrams are sent/received on the network correctly'

Daniel Fuchs daniel.fuchs at oracle.com
Tue Aug 11 15:41:05 UTC 2020


Hi Patrick,

I thought I had mentioned it before, but the DatagramChannel test
looks wrong: if I am not mistaken the assertTrue check that compare
the two buffers will always succeed, even if the data in the two
buffers is different. It only requires that the two buffers are
filled to their limit:

1. Can you add a system.println before verifying that the two
    buffers are equals, that prints both buffers' positions and limit?

2. Can we use assertEquals instead of assertTrue?

3. hint: there are two lines that need to be moved around (at two
    different places) and that should become clear when you look at
    the traces printed in 1.

best,

-- daniel


On 11/08/2020 15:43, Patrick Concannon wrote:
> Hi,
> 
> Could someone please review my fix for JDK-8240901 — ‘Add a test to check that large datagrams are sent/received on the network correctly’ ?
> 
> The tests `java/net/DatagramSocket/SendReceiveMaxSize.java` and `java/net/DatagramSocket/SendReceiveMaxSize.java` have been updated to check (on all platforms) that the sending and receiving of large datagrams across a network are sent, fragmented, and re-assembled correctly. Previously, this check was performed on macOS only.
> 
> issue: https://bugs.openjdk.java.net/browse/JDK-8240901
> webrev: http://cr.openjdk.java.net/~pconcannon/8240901/webrevs/webrev.00/
> 
> Kind regards,
> Patrick
> 



More information about the net-dev mailing list