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

test: Leverage mocha parallelization when running e2e tests for local server and t9s #21695

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

alexvy86
Copy link
Contributor

@alexvy86 alexvy86 commented Jun 28, 2024

Description

This could have consequences or limit some things we could try to do with tests. Locally the local server tests went from 3m to ~ 1m10s. Trying it out for now to see how much impact they have on PR build runtime.

Reviewer Guidance

This brought the e2e local server tests from 3m30s to 1m12s, and the e2e tinylicious tests from 15m27s to an amazing 1m16s... but the number of tests doesn't match? And more surprisingly, this change ran more tests than current PRs normally do.

For tinylicious the run without this change says 3874 passing, 1232 pending, whereas the run with this change says 4697 passing, 409 pending. As an example, the "Summarizer with local changes" tests ran for this PR, but are being skipped today.

I think the discrepancy for those tests is explained by this logic to skip them, which probably is applying correctly today, but somehow gets broken by --parallel. Maybe some environment variables are not getting passed correctly to the worker processes.

@github-actions github-actions bot added area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch and removed area: tests Tests to add, test infrastructure improvements, etc labels Jun 28, 2024
@alexvy86
Copy link
Contributor Author

/azp run Build - client packages

Copy link

Pipelines were unable to run due to time out waiting for the pull request to finish merging.

@alexvy86
Copy link
Contributor Author

/azp run Build - client packages

Copy link

Pipelines were unable to run due to time out waiting for the pull request to finish merging.

@alexvy86
Copy link
Contributor Author

/azp run Build - client packages

Copy link

Pipelines were unable to run due to time out waiting for the pull request to finish merging.

@alexvy86
Copy link
Contributor Author

/azp run Build - client packages

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Jun 28, 2024

Baseline CI build failed, cannot generate bundle analysis at this time


Baseline commit: 7991bef

Generated by 🚫 dangerJS against 2567137

@github-actions github-actions bot added the area: tests Tests to add, test infrastructure improvements, etc label Aug 28, 2024
@alexvy86
Copy link
Contributor Author

Bit of an update on this... the reason the number of tinylicious tests didn't match when running in parallel is that the way we're specifying the FF test options (like the driver) doesn't work with mocha's --parallel flag. We pass them as CLI flags when invoking mocha, but when mocha runs in parallel mode it doesn't pass all its CLI flags to the worker processes that actually run the tests, so in this case the worker processes were running tests with default settings, which meant local driver. I made adjustments to work around this, and the the e2e tinylicious tests started taking pretty much the same amount of time in serial and parallel modes, but with many more failures in the parallel case, so it would seem that for tinylicious in particular it doesn't make sense to parallelize the tests (for now). I'm investigating if there are improvements when running against our internal r11s deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants