Review Request - JDK-6720349: (ch) Channels tests depending on hosts inside Sun

Daniel Fuchs daniel.fuchs at oracle.com
Tue Oct 30 11:32:22 PDT 2012


Hi,

I'm looking for reviewers for:

    JDK-6720349: (ch) Channels tests depending on hosts inside Sun
    http://cr.openjdk.java.net/~dfuchs/JDK-6720349/webrev.00/

This is to fix a test issue.

Several tests in the jdk_nio test suites depends on remote services 
(echo, daytime, discard, to cite a few) being available on remote
hosts inside Oracle network.

The issue is that these tests cannot succeed outside of oracle network
without modification, and were often known to fail even inside oracle
networks depending on the availability of these hosts.

This patch removes the dependencies on remote hosts by making the tests
instantiate and start small TCP or UDP servers within the test VM, thus
emulating the services that used to be provided by the internal
remote hosts.

There are however - a few side effects on the tests themselves (read: on
what the tests are actually testing).

Given that the servers accessed by the tests are now co-located on the
same machine - some assumptions made by the test code had to
be revisited. For instance, some of the tests assumed that by
setting the non blocking flag of the channel to true, and then
calling connect(), they would always obtain a channel in a
connection pending state. With servers on the same hosts, this is
no longer always the case (for instance on Solaris you end up
with a channel already connected).

As a consequence some of the tests, on some architectures, no
longer exactly test what they used to be testing. I have identified
these parts of the test code that may not always be activated
and added comments to outline this.

Tests performed:

I ran the jdk_nio tests using JPRT (hotspotwest).

best regards,

-- daniel





More information about the nio-dev mailing list