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(command-dev): limit concurrency #1713

Merged
merged 2 commits into from
Jan 12, 2021
Merged

Conversation

erezrokah
Copy link
Contributor

This is an attempt to make our CI more stable by limiting the concurrency of the servers we spawn during tests.

@erezrokah erezrokah added the type: chore work needed to keep the product and development running smoothly label Jan 11, 2021
@erezrokah erezrokah force-pushed the chore/limit_dev_tests branch from 4316f4c to 471df22 Compare January 11, 2021 14:39
@erezrokah erezrokah marked this pull request as ready for review January 11, 2021 18:26
@erezrokah erezrokah requested a review from a team as a code owner January 11, 2021 18:26
@erezrokah erezrokah requested a review from ehmicky January 11, 2021 18:26
@erezrokah
Copy link
Contributor Author

@@ -14,6 +15,9 @@ const { withDevServer } = require('./utils/dev-server')
const { startExternalServer } = require('./utils/external-server')
const { withSiteBuilder } = require('./utils/site-builder')

const CONCURRENCY = 1
const semaphore = process.env.CI === 'true' ? new Semaphore(CONCURRENCY) : null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the following work too?

const testFunc = process.env.CI === 'true' ? test.serial.bind(test) : test

testFunct('test title', (t) => { ... })

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I was playing with different values or CONCURRENCY (4->2->1).
We can remove the dependency and enforce serial.

Copy link
Contributor Author

@erezrokah erezrokah Jan 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose to do it a bit different. It required disabling a lint rule, but makes the spec consistent with other ones.
Please let me know if you're good with it.

@erezrokah erezrokah force-pushed the chore/limit_dev_tests branch from 471df22 to a9cf81a Compare January 12, 2021 10:08
@erezrokah erezrokah requested a review from ehmicky January 12, 2021 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants