HDFS-16755. TestQJMWithFaults.testUnresolvableHostName() can fail due to unexpected host resolution (#4833)

Use ".invalid" domain from IETF RFC 2606 to ensure that the host doesn't resolve.

Contributed by Steve Vaughan Jr
This commit is contained in:
Steve Vaughan 2022-09-01 09:00:15 -04:00 committed by GitHub
parent 33edbed54c
commit 2dd8b1342e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,7 +198,7 @@ public void testRecoverAfterDoubleFailures() throws Exception {
public void testUnresolvableHostName() throws Exception {
expectedException.expect(UnknownHostException.class);
new QuorumJournalManager(conf,
new URI("qjournal://" + "bogus:12345" + "/" + JID), FAKE_NSINFO);
new URI("qjournal://" + "bogus.invalid:12345" + "/" + JID), FAKE_NSINFO);
}
/**