You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if this is a bug or a feature request or if I'm simply not understanding how to properly use this package.
Description:
I'm trying to run a web server, then run some e2e tests. When the tests complete successfully, the web server process is ended with SIGTERM, causing NPM to think the tests failed.
If I don't kill the web server, the task keeps running forever/times out.
I've tried concurrently --kill-others --kill-signal=SIGINT "start server" && "run e2e tests"
as well as concurrently --kill-others --success last "start server" && "run e2e tests"
Expected Behaviour:
Processes exit with code 0, NPM thinks (rightfully) that tests pass.
Environment:
In an Azure devOps pipeline running Linux 5.15.0-1074-azure,
v18.20.5,
Concurrently 9.1.0
Reproduction: A way to reproduce the issue concurrently --kill-others --kill-signal=SIGINT "start server" && "run e2e tests"
or concurrently --kill-others --success last "start server" && "run e2e tests"
Would you be able to see whether I'm doing something wrong if this is a feature request or bug?
Many thanks.
The text was updated successfully, but these errors were encountered:
I started fresh today and decided to give it one another crack. As it turns out I didn't configure the command properly.
I should have used --success first instead of --success last.
For anyone facing a similar problem (I think I saw one or two similar issues), consider this:
"your-concurrently-script.js":
const concurrently = require('concurrently');
/** Start dev server */
const startDevServer = 'nx run your-project:serve:development';
/** Wait until dev server is ready, then start running e2e tests */
const startE2eTests = 'wait-on https://localhost:4200 && nx run your-project-e2e:playwright:e2e';
const commands = [startDevServer, startE2eTests];
/** Consider NPM task successful after the first process that exits, exits. Kill other processes when the first command fails or the second command succeeds */
const options = { successCondition: 'first', killOthers: ['failure', 'success'] };
const { result } = concurrently(commands, options);
result.then(
() => {
console.log('Successfully ran e2e tests');
},
() => {
console.log('Failed to run e2e tests');
}
);
I don't know if this is a bug or a feature request or if I'm simply not understanding how to properly use this package.
I'm trying to run a web server, then run some e2e tests. When the tests complete successfully, the web server process is ended with SIGTERM, causing NPM to think the tests failed.
If I don't kill the web server, the task keeps running forever/times out.
I've tried
concurrently --kill-others --kill-signal=SIGINT "start server" && "run e2e tests"
as well as
concurrently --kill-others --success last "start server" && "run e2e tests"
Expected Behaviour:
Processes exit with code 0, NPM thinks (rightfully) that tests pass.
Environment:
In an Azure devOps pipeline running Linux 5.15.0-1074-azure,
v18.20.5,
Concurrently 9.1.0
Reproduction: A way to reproduce the issue
concurrently --kill-others --kill-signal=SIGINT "start server" && "run e2e tests"
or
concurrently --kill-others --success last "start server" && "run e2e tests"
Would you be able to see whether I'm doing something wrong if this is a feature request or bug?
Many thanks.
The text was updated successfully, but these errors were encountered: