Skip to content
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

Hardcode the junit xml hostname to avoid doing DNS lookups in tests #7329

Merged

Conversation

Projects
None yet
2 participants
@stuhood
Copy link
Member

commented Mar 7, 2019

Problem

As described in the removed code, https://bugs.openjdk.java.net/browse/JDK-8170910 means that hostname lookups on OSX can sometimes take a very long time.

But the effect of executing a hostname lookup in the test runner is that we impose this cost even on tests that are well behaved and don't access the network.

Solution

Hardcode the hostname to localhost, which also has advantages for test reproducibility.

Result

Faster network-oblivious tests.

@stuhood stuhood requested review from baroquebobcat, cheister and benjyw Mar 7, 2019

@benjyw

benjyw approved these changes Mar 7, 2019

@stuhood stuhood merged commit 1755e53 into pantsbuild:master Mar 13, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@stuhood stuhood deleted the twitter:stuhood/mock-out-junit-xml-hostname branch Mar 13, 2019

@stuhood

This comment has been minimized.

Copy link
Member Author

commented Mar 13, 2019

Published as:

org.pantsbuild#junit-runner-withretry;0.0.18
org.pantsbuild#junit-runner-annotations;0.0.22
org.pantsbuild#args4j;0.0.20
org.pantsbuild#junit-runner;1.0.25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.