You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/08/18 04:20:17 UTC
[jira] Closed: (HARMONY-1204) [classlib][luni]
tests.api.java.net.DatagramSocketTest.test_connectLjava_net_InetAddressI()
is dependent on unnecessary external server.
[ http://issues.apache.org/jira/browse/HARMONY-1204?page=all ]
Paulex Yang closed HARMONY-1204.
--------------------------------
Verified by Andrew.
> [classlib][luni] tests.api.java.net.DatagramSocketTest.test_connectLjava_net_InetAddressI() is dependent on unnecessary external server.
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1204
> URL: http://issues.apache.org/jira/browse/HARMONY-1204
> Project: Harmony
> Issue Type: Test
> Components: Classlib
> Reporter: Andrew Zhang
> Assigned To: Paulex Yang
> Attachments: Harmony-1204.diff
>
>
> tests.api.java.net.DatagramSocketTest.test_connectLjava_net_InetAddressI() is dependent on unnecessary external server.
> Consider following test code, which is unnecessarily dependent on Support_Configuration.HomeAddress. In fact, the test can be revised to connect to localhost.
> try {
> ds = new java.net.DatagramSocket();
> InetAddress inetAddress = InetAddress.getByName(Support_Configuration.HomeAddress);
> int portNumber = Support_PortManager.getNextPort();
> ds.connect(inetAddress, portNumber);
> assertTrue("Incorrect InetAddress", ds.getInetAddress().equals(
> inetAddress));
> assertTrue("Incorrect Port", ds.getPort() == portNumber);
> ds.disconnect();
> } catch (Exception e) {
> fail("Exception during test : " + e.getMessage());
> }
> I'll upload a patch to fix this problem soon.
> Thanks!
> Best regards,
> Andrew
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira