Regarding the test to check that large datagrams are sent and received
correctly across a network: I've created a new issue for it and
included the link below.
https://bugs.openjdk.java.net/browse/JDK-8240901
Kind regards,
Patrick
On 11/03/2020 16:54, Patrick Concannon wrote:
Hi,
I've included those additional changes, and they can be found in the
new webrev below.
http://cr.openjdk.java.net/~pconcannon/8239355/webrevs/webrev.03/
Kind regards,
Patrick
On 11/03/2020 12:27, Daniel Fuchs wrote:
Hi Alan,
On 11/03/2020 12:08, Alan Bateman wrote:
Do we really? I am not sure we do.
We just want to verify that we don't get the "packet too large"
exception caused by the SO_SNDBUF buffer being too small.
It would be great if we had a test to send large datagrams on the
network as that is the only way to properly test that they can be
re-assembled and received. I don't mind if it's a separate test, I
agree it can be tricky on systems that have unusual configurations.
I'm just pointing out that testing that the send doesn't fail and
that the datagram can be received through the loopback may not be
enough here.
Our test doesn't even try to receive the datagram. It just sends it.
We can write a new test that does the full roundtrip if you think
it's worthwile.
Yes and no - and the test is there to verify that it doesn't have any
unexpected side effects (we know it shouldn't).
My preference would be to drop these so the test only runs twice.
The reason is that the effect of setting
java.net.preferIPv6Addresses is not widely known and it will confuse
anyone that needs to maintain this test in the future.
OK - then we can remove the preferIPv6Addresses property and replace:
114 populateDataProvider(testcases, datagramChannel,
MAX_PAYLOAD,
117 null);
with
if (hasIPv4())
populateDataProvider(testcases, datagramChannel, IPV4_SNDBUF,
StandardProtocolFamily.INET);
if (hasIPv6() && !preferIPv4Stack())
populateDataProvider(testcases, datagramChannel, IPV6_SNDBUF,
StandardProtocolFamily.INET6);
to verify that the channel opened with the no-arg DatagramChannel.open()
can be used to send both IPv4 and IPv6 datagrams.
cheers,
-- daniel