Alan, > On 9 May 2019, at 07:22, Alan Bateman <alan.bate...@oracle.com> wrote: > > On 08/05/2019 12:02, Chris Hegarty wrote: >> : >>> >>> New webrev: http://cr.openjdk.java.net/~aeubanks/8220673/webrev.03/ >> >> : >> >> P.S. adding nio-dev since there are a few tests in that area >> being updated. > Thanks for forwarding. > > IPSupports.skipIfConcurrentConfigurationIsInvalid is a bit strange and I > think the first use of SkippedException in the jdk tests. I'm tempted to > suggest this should be a key that tests should select on via the @requires > tag but that may not be feasible because it depends on properties such as > preferIPv4Stack.
The alternative of using `@requires` was considered and rejected, for the same reason you mention [1]. Additionally, using SkippedException will be more straight forward to detect skipped tests and the reason ( the IP configuration ) why the test was skipped. > So I guess the approach is okay but we should rename the method to start with > "skipTest" as it's not clear from the use-case what is being skipped. Also > "ConcurrentConfigurationIsInvalid" is vague and I think it would be useful if > the method description could emulate the conditions a bit better so that > someone seeing a IPSupport.skipTestXXX knows what is means. I agree that the method name could be improved. It’s really: “skip test if cannot create a minimally-operational IPv4 or IPv6 socket" Some concrete method name suggestions ( more welcome ): - IPSupport::skipTestIfNonOperational - IPSupport::skipTestIfCannotCreateAnyIPSockets Suggested method-level documentation improvement: /** * Ensures that the platform supports the ability to create a * minimally-operational socket whose protocol is either one of IPv4 * or IPv6. * * <p> A minimally-operation socket is one that can be created and * bound to an IP-specific loopback address. IP support is * considered non-operational if a socket cannot be bound to either * one of, an IPv4 loopback address, or the IPv6 loopback address. * * @throws SkippedException if the current networking configuration * is non-operational */ public static void skipTestIfNonOperational() throws SkippedException -Chris. P.S. 8220673 has been pushed already, but we should continue the discussion here and I will create a follow-on JIRA issue to track it. [1] https://mail.openjdk.java.net/pipermail/net-dev/2019-April/012348.html