harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghar...@apache.org
Subject svn commit: r416674 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/InetAddressTest.java
Date Fri, 23 Jun 2006 11:27:24 GMT
Author: gharley
Date: Fri Jun 23 04:27:23 2006
New Revision: 416674

URL: http://svn.apache.org/viewvc?rev=416674&view=rev
Log:
Another tweak to make test case more portable. 

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/InetAddressTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/InetAddressTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/InetAddressTest.java?rev=416674&r1=416673&r2=416674&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/InetAddressTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/InetAddressTest.java
Fri Jun 23 04:27:23 2006
@@ -91,7 +91,10 @@
 					String hostName = ia.getHostName();
 					String hostAddress = ia.getHostAddress();
 
-					if (!correctName.equals(hostName)) {
+                    // Intentionally not looking for exact name match so that 
+                    // the test works across different platforms that may or 
+                    // may not include a domain suffix on the hostname
+                    if (!hostName.startsWith(correctName)) {
 						threadedTestSucceeded = false;
 						threadedTestErrorString = (testType == 0 ? "gethostbyname"
 								: "gethostbyaddr")
@@ -100,6 +103,7 @@
 								+ " instead of " + correctName;
 						break;
 					}
+                    // IP addresses should match exactly
 					if (!correctAddress.equals(hostAddress)) {
 						threadedTestSucceeded = false;
 						threadedTestErrorString = (testType == 0 ? "gethostbyname"



Mime
View raw message