Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Localhost network interaction in tests

by rkrieger (Friar)
on Jan 02, 2012 at 14:12 UTC ( #945918=note: print w/replies, xml ) Need Help??

in reply to Localhost network interaction in tests

Your test assumes a common, though not guaranteed, environment and would fail in several modes. Things that come to mind are:

  • restricted localhost traffic
  • non-root user trying to bind port 80
  • IPv6-only systems (?)

I'd say none of these really are your code's fault. Asking the testing user for environment details that should work for them seems pretty fair to me, even if you have (understandable) reservations. This reminds me of the Astro::SpaceTrack module I use for work (e.g. its query test). I'm sure there are other ways of doing this, though.

Alternatively, stick with localhost as a default and simply skip over the tests if the basic HTTP traffic fails. If you want to filter out noise in failure reports, have things fail with a reference error/warning text that's easy for you to filter out as noise.

  • Comment on Re: Localhost network interaction in tests

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://945918]
[shmem]: moin Corion, karlgoethebier. I stumbled over <<>> occasionally on the p5p mailing list
[Discipulus]: not noticed
[karlgoethebier]: sometimes rereading manages is helpful ;-) at least for me...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2017-07-21 07:59 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (319 votes). Check out past polls.