|
11 | 11 |
|
12 | 12 | package io.vertx.tests.dns; |
13 | 13 |
|
14 | | -import static io.vertx.test.core.TestUtils.assertNullPointerException; |
15 | | - |
16 | | -import java.net.InetSocketAddress; |
17 | | -import java.util.Collections; |
18 | | -import java.util.SortedMap; |
19 | | -import java.util.TreeMap; |
20 | | -import java.util.concurrent.CountDownLatch; |
21 | | -import java.util.function.Function; |
22 | | - |
23 | 14 | import io.netty.resolver.dns.DnsNameResolverTimeoutException; |
| 15 | +import io.vertx.core.Vertx; |
| 16 | +import io.vertx.core.VertxException; |
| 17 | +import io.vertx.core.VertxOptions; |
24 | 18 | import io.vertx.core.dns.DnsClient; |
25 | 19 | import io.vertx.core.dns.DnsClientOptions; |
26 | 20 | import io.vertx.core.dns.MxRecord; |
27 | 21 | import io.vertx.core.dns.SrvRecord; |
28 | 22 | import io.vertx.test.core.TestUtils; |
29 | 23 | import io.vertx.test.core.VertxTestBase; |
| 24 | +import io.vertx.test.fakedns.FakeDNSServer; |
| 25 | +import io.vertx.test.netty.TestLoggerFactory; |
30 | 26 | import org.apache.directory.server.dns.messages.DnsMessage; |
31 | 27 | import org.apache.directory.server.dns.store.RecordStore; |
32 | | -import org.junit.Ignore; |
33 | 28 | import org.junit.Test; |
34 | 29 |
|
35 | | -import io.vertx.core.Vertx; |
36 | | -import io.vertx.core.VertxException; |
37 | | -import io.vertx.core.VertxOptions; |
38 | | -import io.vertx.test.fakedns.FakeDNSServer; |
39 | | -import io.vertx.test.netty.TestLoggerFactory; |
| 30 | +import java.net.InetSocketAddress; |
| 31 | +import java.util.Collections; |
| 32 | +import java.util.SortedMap; |
| 33 | +import java.util.TreeMap; |
| 34 | +import java.util.concurrent.CountDownLatch; |
| 35 | +import java.util.function.Function; |
| 36 | + |
| 37 | +import static io.vertx.test.core.TestUtils.assertNullPointerException; |
40 | 38 |
|
41 | 39 | /** |
42 | 40 | * @author <a href="mailto:[email protected]">Norman Maurer</a> |
@@ -565,6 +563,12 @@ public void testClose() throws Exception { |
565 | 563 | await(); |
566 | 564 | } |
567 | 565 |
|
| 566 | + @Test |
| 567 | + public void testIpv6NameServer() { |
| 568 | + // We just want to verify that we can create a client with an IPv6 address as DNS server |
| 569 | + vertx.createDnsClient(new DnsClientOptions().setPort(53).setHost("::1")); |
| 570 | + } |
| 571 | + |
568 | 572 | private DnsClient prepareDns() throws Exception { |
569 | 573 | return prepareDns(new DnsClientOptions().setQueryTimeout(15000)); |
570 | 574 | } |
|
0 commit comments