harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-1204) [classlib][luni] tests.api.java.net.DatagramSocketTest.test_connectLjava_net_InetAddressI() is dependent on unnecessary external server.
Date Fri, 18 Aug 2006 02:20:17 GMT
     [ 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

        

Mime
View raw message