libwww-perl / WWW-Mechanize

Handy web browsing in a Perl object
https://metacpan.org/pod/WWW::Mechanize
Other
68 stars 52 forks source link

test - www-mechanize will fail & halt if 127.0.0.1 lo interface isn't available #253

Open japharl opened 6 years ago

japharl commented 6 years ago

Weirdly, on one of the machines I use, the localhost ip assigned to lo isn't being assigned to 127.0.0.1. When running make test, the install will fail if 127.0.0.1 ip address is not available. Specifically, the t/local/referrer test will cause the machine to hang, after a can't connect to 127.0.0.1:(port) (Connection timed out) at t/local/referrer.t line 39. You may be able to use IO::Interface::Simple to check to see if the interface exists.

oalders commented 6 years ago

Thanks for catching this. I know there have been issues with hanging tests in the past. It looks like IO::Interface::Simple has a lot of test failures, though. Not sure what else might do the job.

japharl commented 6 years ago

Actually, it looks like HTTP::Daemon is dieing with an error (HTTP::Daemon Cannot assign requested address ... propagated at /root/.cpan/build/WWW-Mechanize-1.88-8/t/local/log-server line 14)... Guessing you could catch when that error is thrown and then if that fails just skip the test.

jkeenan commented 1 year ago

Weirdly, on one of the machines I use, the localhost ip assigned to lo isn't being assigned to 127.0.0.1. When running make test, the install will fail if 127.0.0.1 ip address is not available. Specifically, the t/local/referrer test will cause the machine to hang, after a can't connect to 127.0.0.1:(port) (Connection timed out) at t/local/referrer.t line 39. You may be able to use IO::Interface::Simple to check to see if the interface exists.

Can you tell us whether this problem has cleared up now that there have been new CPAN releases of WWW-Mechanize and HTTP-Daemon?