Closed kellyjosephprice closed 7 months ago
Speeds up a few tests by mocking out git commands.
git
I was poking around to investigate a bug (https://linear.app/readme-io/issue/RM-8336/childdocs-are-createdsyncd-before-parentdocs-in-rdme-cli) and noticed some test timeouts when running them locally. It looks like for a number of tests, we were making actual requests like git remote. I don't understand why those can be so slow, they're nearly instant when running them in a shell?
git remote
my machine before
my machine after
With all the parallelization, and the fact that the slowest part seems to be the e2e tests, the actual speed up on CI is negligible. But for running individual test files, they go from 5+ seconds to <1 second.
Tests should pass???
amazing, LGTM! are you still seeing the perf benefits?
Yea, it looked like the exact same time for test runs.
🧰 Changes
Speeds up a few tests by mocking out
git
commands.I was poking around to investigate a bug (https://linear.app/readme-io/issue/RM-8336/childdocs-are-createdsyncd-before-parentdocs-in-rdme-cli) and noticed some test timeouts when running them locally. It looks like for a number of tests, we were making actual requests like
git remote
. I don't understand why those can be so slow, they're nearly instant when running them in a shell?my machine before
my machine after
With all the parallelization, and the fact that the slowest part seems to be the e2e tests, the actual speed up on CI is negligible. But for running individual test files, they go from 5+ seconds to <1 second.
🧬 QA & Testing
Tests should pass???