Skip to content

Commit

Permalink
Merge pull request #183 from imonteroperez/adapt-ipv6
Browse files Browse the repository at this point in the history
Adapt TheFlintstonesTest to IPv6 testing environments
  • Loading branch information
jtnord authored Feb 14, 2024
2 parents 8bd7044 + 7690fd7 commit 7a4fb4c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import javax.naming.CommunicationException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
Expand Down Expand Up @@ -98,7 +99,7 @@ public void overrideDNS() throws Exception {
// see hudson.plugins.active_directory.ActiveDirectoryDomain.createDNSLookupContext()
// getHost returns a hostname not IPaddress...
// use our DNS to resolve that to an IP address.
String DNS_URLs = "dns://"+InetAddress.getByName(docker.getHost()).getHostAddress()+":"+docker.getDNSPort();
String DNS_URLs = new URI("dns", null, InetAddress.getByName(docker.getHost()).getHostAddress(), Integer.parseInt(docker.getDNSPort()), null, null, null).toASCIIString();
System.setProperty(DNSUtils.OVERRIDE_DNS_PROPERTY, DNS_URLs);
}

Expand Down

0 comments on commit 7a4fb4c

Please sign in to comment.