On 11/03/2020 10:58, Daniel Fuchs wrote:
:

testSend sends to the loopback address but I think we need this test to send datagrams on the network (sending to the loopback is okay too but I think you want this test to send a datagram on the network because we want fragmentation on the network(.

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.

:

The java.net.preferIPv6Addresses system property is about configuring the order of name service lookup. These runs shouldn't impact anything here, dual and preferIPv4Stack=true should be all that is needed.

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.

-Alan

Reply via email to