harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zhang (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1204) [classlib][luni] tests.api.java.net.DatagramSocketTest.test_connectLjava_net_InetAddressI() is dependent on unnecessary external server.
Date Wed, 16 Aug 2006 06:13:15 GMT
[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


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