Skip to content

Commit

Permalink
AS7-3041 Fix test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bstansberry committed Feb 12, 2012
1 parent ce94e74 commit 5d78387
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static void setup() throws Exception {
processNetworkInterface(sub);
}
}
System.out.println("loopback = " + loopbackAddress);
System.out.println("loopback: " + loopbackInterface + " " + loopbackAddress);
for (Map.Entry<NetworkInterface, Set<Inet6Address>> entry : addresses.entrySet()) {
System.out.println(entry.getKey() + " " + entry.getValue());
}
Expand Down Expand Up @@ -100,8 +100,11 @@ public void testLoopback() throws Exception {
if (loopbackAddress.getScopeId() > 0) {
assertEquals(loopbackAddress, criteria.isAcceptable(loopbackInterface, loopbackAddress));
} else {
// This match fails because ::1%lo becomes ::1%<number_of_lo>
assertNull(criteria.isAcceptable(loopbackInterface, loopbackAddress));
InetAddress match = criteria.isAcceptable(loopbackInterface, loopbackAddress);
if (!loopbackAddress.equals(match)) {
// This match fails because ::1%lo becomes ::1%<number_of_lo> which isn't 0
assertNull(match + " is invalid", criteria.isAcceptable(loopbackInterface, loopbackAddress));
}
}
criteria = new InetAddressMatchInterfaceCriteria(new ModelNode("::1%" + loopbackAddress.getScopeId()));
assertEquals(loopbackAddress, criteria.isAcceptable(loopbackInterface, loopbackAddress));
Expand Down

0 comments on commit 5d78387

Please sign in to comment.