Skip to content

Commit

Permalink
Issue #4483 - More resiliency on bad DNS servers
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Jan 16, 2020
1 parent b25a587 commit 782c099
Showing 1 changed file with 5 additions and 6 deletions.
Expand Up @@ -122,14 +122,13 @@ public void testBadSingleton(final String badAddr)
InetAddress inetAddress = InetAddress.getByName(badAddr);
Assumptions.assumeTrue(inetAddress == null);
}
catch (UnknownHostException ignored)
catch (UnknownHostException expected)
{
//noinspection MismatchedQueryAndUpdateOfCollection
InetAddressSet inetAddressSet = new InetAddressSet();
IllegalArgumentException cause = assertThrows(IllegalArgumentException.class, () -> inetAddressSet.add(badAddr));
assertThat(cause.getMessage(), containsString(badAddr));
}

//noinspection MismatchedQueryAndUpdateOfCollection
InetAddressSet inetAddressSet = new InetAddressSet();
IllegalArgumentException cause = assertThrows(IllegalArgumentException.class, () -> inetAddressSet.add(badAddr));
assertThat(cause.getMessage(), containsString(badAddr));
}

@Test
Expand Down

0 comments on commit 782c099

Please sign in to comment.