RFR[8240901]: 'Add a test to check that large datagrams are sent/received on the network correctly'
Daniel Fuchs
daniel.fuchs at oracle.com
Wed Aug 12 09:18:05 UTC 2020
Hi Patrick,
Still one more thing:
test/jdk/java/net/DatagramSocket/SendReceiveMaxSize.java
124 // check packet data has been fragmented and
re-assembled correctly at receiver
125 assertTrue(Arrays.equals(receivePkt.getData(),
testData));
1. I think you should first check that the length matches:
assertEquals(receivePacket.getLength(), capacity);
2. You can use assertEquals to compare two byte[] arrays as well,
since org.testng.Assert has an assertEquals overload for byte[]
assertEquals(receivePkt.getData(), testData);
Otherwise LGTM!
best regards,
-- daniel
On 11/08/2020 20:45, Patrick Concannon wrote:
> Hi Daniel,
>
> Thanks for pointing this out.
>
> Please find the corrections in the updated webrev below.
>
> http://cr.openjdk.java.net/~pconcannon/8240901/webrevs/webrev.01/
>
> Kind regards,
> Patrick
>
More information about the net-dev
mailing list