RFR: 8254692: (se) Clarify the behaviour of the non-abstract SelectorProvider::inheritedChannel

Chris Hegarty chegar at openjdk.java.net
Tue Oct 20 09:07:13 UTC 2020


On Tue, 20 Oct 2020 08:52:23 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> The test method being changed here assets other aspects of the default implementation of `SelectorProvider` - this is
>> just another case. I guess is depends on ones view, whether these checks should be co-located based on functionality or
>> based on category of behaviour.  It might be best to create a new
>> test/jdk/java/nio/channels/spi/SelectorProvider/DefaultImplementationTest.java to hold such, and move the other
>> assertions there too.  But the higher-order bit is that we have tests.
>
> ProtocolFamilies/testCustomProvider exercises the methods that take a protocol family, it's not really the right place
> to exercise the inheritedChannel method. Can we add a test to
> test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel instead?

No disagreement about testCustomProvider not being the most appropriate place to test the default implementation of
inheritedChannel. What I was suggesting was to move *all* the assertions related to the default implementation of
SelectorProvider to a single new test located under test/jdk/java/nio/channels/spi/SelectorProvider/, rather than
splitting the tests for the default implementation across several different tests and directory hierarchies.

-------------

PR: https://git.openjdk.java.net/jdk/pull/745


More information about the nio-dev mailing list