-
Notifications
You must be signed in to change notification settings - Fork 367
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
Conversation
4316f4c
to
471df22
Compare
@ehmicky this doesn't solve all our CI issues, but looks like it doesn't impact performance: |
tests/command.dev.test.js
Outdated
@@ -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 |
There was a problem hiding this comment.
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) => { ... })
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
471df22
to
a9cf81a
Compare
This is an attempt to make our CI more stable by limiting the concurrency of the servers we spawn during tests.