Fence off Network IO with NO_NETWORK_TESTING #561
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a workaround for #477 but doesn't actually fix the underlying
issue, merely recognises that some vendors are smart enough to
anticipate Network IO will fail and integrate this ENV var to quickly
avoid it.
This precedent was established by Test::RequiresInternet as a result of
a CPANworkers discussion, and Gentoo is known to export this variable
within its tooling by default as a result.
This doesn't actually test that binding a socket/IP will work, but this
fence should be tested anyway, because security measures could result in
attempted socket/IP binds getting SIGKILLed ( Sandbox )
This commit hence addresses/fences only the problem cases listed in bug
in depth.
However, this commit targets to simply solve the known parts of the
problem in the simplest way possible without any extra dependencies.
The application of a BEGIN { } block and
print
was a design decisioninstead of using
Test::More
andskip
, because the overhead ofloading Test::More is quite high when you have lots of .t files, and
Test2 further increases the load time.
This load time is generally acceptable if you're actually running a
dozen tests, but spinning up a full suite of Test::More to only then
immediately exit with a skip is a lot of CPU load for relatively little
benefit.