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

Windows CLI tests are unpredictably slow #275

Open
JustinBeckwith opened this issue Feb 17, 2021 · 1 comment
Open

Windows CLI tests are unpredictably slow #275

JustinBeckwith opened this issue Feb 17, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@JustinBeckwith
Copy link
Owner

Every time I run the tests locally on Windows, I'm seeing weird lags and delays:

    √ should show output for failures (5069ms)
    √ should pass successful markdown scan (524ms)
    √ should allow multiple paths (538ms)
    √ should show help if no params are provided (405ms)
    √ should flag skipped links (490ms)
    √ should provide CSV if asked nicely (512ms)
    √ should provide JSON if asked nicely (487ms)
    √ should not show links if --silent (502ms)
    √ should not show 200 links if verbosity is ERROR with JSON (518ms)
    √ should accept a server-root (501ms)
    √ should accept globs (561ms)
    √ should throw on invalid format (410ms)
    √ should throw on invalid verbosity (409ms)
    √ should throw when verbosity and silent are flagged (419ms)
    √ should show no output for verbosity=NONE (5073ms)
    √ should show callstacks for verbosity=DEBUG (5079ms)
    √ should allow passing a config (490ms)
    √ should warn on retries (1478ms)

There's no network access happening here, so there's no good reason for tests to be taking 5 seconds or longer. On OSX they are in the 100ms range.

@JustinBeckwith JustinBeckwith added enhancement New feature or request help wanted Extra attention is needed labels Feb 17, 2021
@JustinBeckwith
Copy link
Owner Author

I did the digging here, and it turns out that failed HTTP request via gaxios, via node-fetch, are the cause of the inconsistent behavior. A failed HTTP request to an unknown host is taking about 2.5 seconds on Windows, vs near immediate on OSX. Next steps are to figure out if this is a gaxios bug, a node-fetch bug, or just one of those things that's going to be different on an OS by OS basis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant