JDK-8243488 : Add tests for set/get SendBufferSize and getReceiveBufferSize in DatagramSocket
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 8,11,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-04-23
  • Updated: 2021-03-25
  • Resolved: 2020-05-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 15
11.0.10Fixed 15 b22Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Tests need to be added to increase test coverage for the DatagramSocket class. 
Currently, the following methods are not covered: 

`DatagramSocket.getSendBufferSize()`
`DatagramSocket.setSendBufferSize(int size)`
`DatagramSocket.getReceiveBufferSize()`
Comments
Another possibility is to change the provider in the backported test to skip DatagramChannel::socket when testing for initial buffer size on mac.
11-12-2020

Thanks for the hint, Daniel. I was already wondering but didn't have the time to dig deeper yet. Will take care of a backport of JDK-8239355 to OpenJDK 11u.
10-12-2020

Note: the SendBufferSize test will fail on macOS for the DatagramSocketAdaptor unless JDK-8239355 is present.
10-12-2020

Fix Request (11u) This change extends the testing. Patch does not apply cleanly because the old test is written differently. 11u RFR (acked by phh): https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-November/004141.html. Linux x86_64 passes new tests.
16-11-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/cf9358cd555b User: pconcannon Date: 2020-05-05 17:35:48 +0000
05-05-2020