From: <pj...@us...> - 2011-03-11 23:28:44
|
Revision: 7212 http://jython.svn.sourceforge.net/jython/?rev=7212&view=rev Author: pjenvey Date: 2011-03-11 23:28:37 +0000 (Fri, 11 Mar 2011) Log Message: ----------- Merged revisions 7210 via svnmerge from https://jython.svn.sourceforge.net/svnroot/jython/trunk ........ r7210 | pjenvey | 2011-03-11 16:23:50 -0500 (Fri, 11 Mar 2011) | 2 lines skip these on our older FreeBSD 6.2 buildbot as it has spotty IPV6 support ........ Modified Paths: -------------- branches/Release_2_5maint/jython/Lib/test/test_socket.py Property Changed: ---------------- branches/Release_2_5maint/ branches/Release_2_5maint/jython/ Property changes on: branches/Release_2_5maint ___________________________________________________________________ Modified: svnmerge-integrated - /trunk:1-7207 + /trunk:1-7207,7210 Added: svn:mergeinfo + /trunk:7210 Property changes on: branches/Release_2_5maint/jython ___________________________________________________________________ Modified: svn:mergeinfo - /branches/jsr223:6285-6565 /branches/newstyle-java-types:5564-5663,5666-5729 + /branches/jsr223:6285-6565 /branches/newstyle-java-types:5564-5663,5666-5729 /trunk/jython:7210 Modified: branches/Release_2_5maint/jython/Lib/test/test_socket.py =================================================================== --- branches/Release_2_5maint/jython/Lib/test/test_socket.py 2011-03-11 23:22:38 UTC (rev 7211) +++ branches/Release_2_5maint/jython/Lib/test/test_socket.py 2011-03-11 23:28:37 UTC (rev 7212) @@ -1510,7 +1510,12 @@ self.failUnlessEqual(str(ipv4_address_tuple), "('127.0.0.1', 80)") self.failUnlessEqual(repr(ipv4_address_tuple), "('127.0.0.1', 80)") - ipv6_address_tuple = socket.getaddrinfo("localhost", 80, socket.AF_INET6, socket.SOCK_STREAM, 0, 0)[0][4] + addrinfo = socket.getaddrinfo("localhost", 80, socket.AF_INET6, socket.SOCK_STREAM, 0, 0) + if not addrinfo and is_bsd: + # older FreeBSDs may have spotty IPV6 Java support (at least + # our FreeBSD 6.2 buildbot does) + return + ipv6_address_tuple = addrinfo[0][4] self.failUnless (ipv6_address_tuple[0] in ["::1", "0:0:0:0:0:0:0:1"]) self.failUnlessEqual(ipv6_address_tuple[1], 80) self.failUnlessEqual(ipv6_address_tuple[2], 0) @@ -1536,7 +1541,11 @@ self.failUnlessEqual(sockaddr.port, 80) def testIPV6AddressesFromGetAddrInfo(self): - local_addr = socket.getaddrinfo("localhost", 80, socket.AF_INET6, socket.SOCK_STREAM, 0, 0)[0][4] + addrinfo = socket.getaddrinfo("localhost", 80, socket.AF_INET6, socket.SOCK_STREAM, 0, 0) + if not addrinfo and is_bsd: + # older FreeBSDs may have spotty IPV6 Java support + return + local_addr = addrinfo[0][4] sockaddr = socket._get_jsockaddr(local_addr) self.failUnless(isinstance(sockaddr, java.net.InetSocketAddress), "_get_jsockaddr returned wrong type: '%s'" % str(type(sockaddr))) self.failUnless(sockaddr.address.hostAddress in ["::1", "0:0:0:0:0:0:0:1"]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |