Skip to content

Commit

Permalink
Reproducer for IllegalStateException when DNS responds with DNAME record
Browse files Browse the repository at this point in the history
The new test times out after a while, because the handler is never
called due to RecordDecoder throwing IllegalStateException.
  • Loading branch information
mnylen authored and vietj committed Nov 6, 2023
1 parent f32d88b commit f5a80eb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/test/java/io/vertx/core/dns/DNSTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,19 @@ public void testLookup4CNAME() throws Exception {
await();
}

@Test
public void testResolveMXWhenDNSRepliesWithDNAMERecord() throws Exception {
final DnsClient dns = prepareDns();
dnsServer.testResolveDNAME("mail.vertx.io");

dns.resolveMX("vertx.io")
.onComplete(ar -> {
assertTrue(ar.failed());
testComplete();
});
await();
}

private TestLoggerFactory testLogging(DnsClientOptions options) {
final String ip = "10.0.0.1";
dnsServer.testResolveA(ip);
Expand Down

0 comments on commit f5a80eb

Please sign in to comment.