Skip to content

Commit

Permalink
JGRP-2295 Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Laskawiec committed Sep 26, 2018
1 parent d7a849c commit 2c9858a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -8,7 +8,7 @@
import org.testng.Assert;
import org.testng.annotations.Test;

public class DefaultDNSResolverTest {
public class AddressedDNSResolverTest {

@Test
public void test_parsing_a_entries() throws Exception {
Expand All @@ -17,7 +17,7 @@ public void test_parsing_a_entries() throws Exception {
.addEntry("test", "192.168.0.1", DNSResolver.DNSRecordType.A)
.addEntry("test", "192.168.0.2", DNSResolver.DNSRecordType.A);

DefaultDNSResolver resolver = new DefaultDNSResolver(mockDirContext);
AddressedDNSResolver resolver = new AddressedDNSResolver(mockDirContext);

//when
List<Address> addresses = resolver.resolveIps("test", DNSResolver.DNSRecordType.A);
Expand Down Expand Up @@ -51,7 +51,7 @@ public void test_parsing_srv_entries() throws Exception {
.addEntry("9089f34a.jgroups-dns-ping.local", "192.168.0.1", DNSResolver.DNSRecordType.A)
.addEntry("9089f34a.jgroups-dns-ping.local", "192.168.0.2", DNSResolver.DNSRecordType.A);

DefaultDNSResolver resolver = new DefaultDNSResolver(mockDirContext);
AddressedDNSResolver resolver = new AddressedDNSResolver(mockDirContext);

//when
List<Address> addresses = resolver.resolveIps("test", DNSResolver.DNSRecordType.SRV);
Expand Down
Expand Up @@ -44,8 +44,8 @@ public void test_failing_on_no_dns_query() throws Exception {
public void test_valid_dns_response() throws Exception {
//given
DNSDiscoveryTester dns_discovery_tester = new DNSDiscoveryTester(2, PORT_START, 500, TimeUnit.SECONDS)
.add("test.svc.cluster.local", DNSResolver.DNSRecordType.A, new IpAddress(InetAddress.getLoopbackAddress(), PORT_START))
.add("test.svc.cluster.local", DNSResolver.DNSRecordType.A, new IpAddress(InetAddress.getLoopbackAddress(), PORT_START + 1));
.add("test", DNSResolver.DNSRecordType.A, new IpAddress(InetAddress.getLoopbackAddress(), PORT_START))
.add("test", DNSResolver.DNSRecordType.A, new IpAddress(InetAddress.getLoopbackAddress(), PORT_START + 1));

//when
boolean was_view_received = dns_discovery_tester.runTestAndCheckIfViewWasReceived("test", "A");
Expand Down

0 comments on commit 2c9858a

Please sign in to comment.