-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Figure out why unit tests occasionally time out #3455
Comments
From discussion in 3510 with @arcanis :
If the tests making web requests and hitting live metadata repos, this could be a cause for fragile tests in the future. It would be good to make a plan to make the tests run as "offline" as possible. Since Yarn already supports a fully offline install through use of the cache and "offline mirror" features, would it be feasible to load all packages and metadata used for tests into an offline mirror, and then always run tests in an "offline" mode? |
Alternatively, could we just load the metadata package.json file from the repository into |
@arcanis It looks like some of the tests don't hit real HTTP requests. There is a mock requester in If the file exists, it just returns it. If the file does not exist, then it does the actual HTTP request, and writes the response to the request-cache directory (where a dev could then check it in to Git) The metadata is also saved here. For example for So if a new version of I said "some of the tests" because not all of them seem to actually use it. If I run the command:
With a network connection:
Without a network connection:
A good task for someone might be to run all the tests offline, see which ones fail, and see if we can wire in a mock requester for those too. |
Yup. Closing for now. |
CI builds often fail due to tests timing out. It also happens (very infrequently) when running tests locally.
Example output (this was from a local test run on a Macbook Pro, OSX Sierra, Node v6.3.0):
I'll try to dig into this as best I can, but I would appreciate some help... 🆘
The text was updated successfully, but these errors were encountered: