Skip to content

Commit 683b944

Browse files
committed
HADOOP-18087. fix bugs on TestRegistryDNS.java
1 parent ac89069 commit 683b944

File tree

1 file changed

+4
-4
lines changed
  • hadoop-common-project/hadoop-registry/src/test/java/org/apache/hadoop/registry/server/dns

1 file changed

+4
-4
lines changed

hadoop-common-project/hadoop-registry/src/test/java/org/apache/hadoop/registry/server/dns/TestRegistryDNS.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ public void testSplitReverseZoneNames() throws Exception {
637637
@Test
638638
public void testExampleDotCom() throws Exception {
639639
Name name = Name.fromString("example.com.");
640-
Record[] records = getRegistryDNS().getRecords(name, Type.SOA);
640+
Record[] records = getRegistryDNS().getRecords(name, Type.SOA).answers;
641641
assertNotNull(records, "example.com exists:");
642642
}
643643

@@ -699,16 +699,16 @@ public void testMultiARecord() throws Exception {
699699
@Timeout(value = 5)
700700
public void testUpstreamFault() throws Exception {
701701
Name name = Name.fromString("19.0.17.172.in-addr.arpa.");
702-
Record[] recs = getRegistryDNS().getRecords(name, Type.CNAME);
702+
Record[] recs = getRegistryDNS().getRecords(name, Type.CNAME).answers;
703703
assertNull(recs, "Record is not null");
704704
}
705705

706706
@Test
707707
public void testNODATA() throws Exception {
708708
Name name = Name.fromString("example.com.");
709709
RegistryDNS.RemoteAnswer ra = getRegistryDNS().getRecords(name, Type.CNAME);
710-
assertNull("CNAME record for example.com. should be null.", ra.answers);
711-
assertEquals("The result of DNS query for example.com. should be NOERROR.", Rcode.NOERROR, ra.rcode);
710+
assertNull(ra.answers, "CNAME record for example.com. should be null.");
711+
assertEquals(Rcode.NOERROR, ra.rcode, "The result of DNS query for example.com. should be NOERROR.");
712712
}
713713

714714
public RegistryDNS getRegistryDNS() {

0 commit comments

Comments
 (0)