question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test fail: StringToInetAddressConverterTests relies on NSLookup

See original GitHub issue

Bug Report Got a Test fail when building the current master.

StringToInetAddressConverterTests fails on my machine because it relies on the local nslookup. The test assumes that the host ireallydontexist.example.com is not known and therefore does throw an exception in InetAddress.getByName(source);.

Sadly my ISP’s has a strange default error page for DNS lookup errors and therefore that host does exist for me => I got a test fail.

Last screenshot is of a watch of the command which should throw that exception instead of returning the shown object.

bildschirmfoto 2018-02-03 um 21 49 15 bildschirmfoto 2018-02-03 um 21 53 34

Switching off my internet or changing the DNS to e.g. 8.8.8.8 does solve that issue.

Not sure if this is a real bug per se, just wanted to point it out. Would have liked to update it myself but I am a bit clueless since InetAddress is a system class and until now I know no possibility to update the nslookup from java directly for a specific hostname.

Any ideas / suggestions?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
eiselemscommented, Jun 5, 2018

Love the title of the commit message 😊 Well done

1reaction
philwebbcommented, Jun 1, 2018

Removing it doesn’t seem wise, but we could add an assume to ensure resolve will fail.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Convert a String to InetAddress without DNS lookup
I want to convert it to an InetAddress to feed it to Socket , but I need to do it without doing a...
Read more >
Understanding, Tuning, and Testing the InetAddress Class ...
The InetAddress class provides methods to resolve hostnames to their IP addresses. These methods rely on the operating system to perform ...
Read more >
InetAddress.getByName failing for valid domains — oracle-tech
On some machines, domains starting with the hyphen (and other non-alphabetic characters) are not resolved by InetAddress.getByName() nslookup does resolve ...
Read more >
java.net.InetAddress Scala Example - ProgramCreek.com
NoStackTrace final class GrpcServerOwner( address: Option[String], ... TimeServiceGrpc import com.daml.ledger.client.services.testing.time.
Read more >
RFC 4560 - Definitions of Managed Objects for Remote Ping ...
In both cases traceroute relies on the probes being rejected via an ICMP ... the number of probe failures that signal when a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found