-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: cache lazy properties, fix style nits #1196
Conversation
'as LOCALHOST or expect some tests to fail.'); | ||
} | ||
} else { | ||
localhostIPv4 = '127.0.0.1'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will never be reached for FreeBSD jails that hasn't set LOCALHOST. I think falling back to '127.0.0.1' is the right thing here.
Sorry for being too quick on the gun in #1167. Minor nit otherwise LGTM. |
f3f6f6d
to
11042de
Compare
@jbergstroem ptal, I've changed the logic around the default fallback |
LGTM – thanks again for improving my version. (am I the only one that's annoyed by the alignment of the shipit icon?) |
inFreeBSDJail involves an execSync() and is used by localhost_ipv4 so will be unnecessarily expensive, so cache both values and reuse rather than re-evaluate each time. Renamed localhost_ipv4 to localhostIPv4 for style consistency. PR-URL: nodejs#1196 Reviewed-By: Johan Bergström <[email protected]>
11042de
to
f600111
Compare
landed @ f600111 |
(addressing the concerns I raised too late in #1167)
inFreeBSDJail
involves anexecSync()
and is used bylocalhost_ipv4
so will be unnecessarily expensive, so cache both values and reuse rather than re-evaluate each time.Renamed
localhost_ipv4
tolocalhostIPv4
for style consistency./R=@jbergstroem
/R=@bnoordhuis