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

Fixed issue #192: When the launchId parameter is specified, all child processes would hang until the entire test set execution was completed. #194

Merged
merged 6 commits into from
Jun 20, 2024
3 changes: 0 additions & 3 deletions lib/cypressReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ class CypressReporter extends Mocha.reporters.Base {
});

this.runner.on(EVENT_RUN_END, () => {
if (CypressReporter.reporterOptions.launchId) {
return;
}
CypressReporter.calcTotalLaunches();
if (CypressReporter.shouldStopLaunch()) {
this.worker.send({ event: EVENT_RUN_END, launch: getLaunchStartObject(config) });
Expand Down
24 changes: 14 additions & 10 deletions lib/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,20 @@
}

runEnd() {
const finishLaunchPromise = this.client
.finishLaunch(
this.tempLaunchId,
Object.assign(
{
endTime: new Date().valueOf(),
},
this.launchStatus && { status: this.launchStatus },
),
)
const basePromise =

Check failure on line 77 in lib/reporter.js

View workflow job for this annotation

GitHub Actions / test

Delete `⏎·····`
this.config.reporterOptions.launchId
? this.client.getPromiseFinishAllItems(this.tempLaunchId)

Check failure on line 79 in lib/reporter.js

View workflow job for this annotation

GitHub Actions / test

Delete `··`
: this.client.finishLaunch(

Check failure on line 80 in lib/reporter.js

View workflow job for this annotation

GitHub Actions / test

Delete `··`
this.tempLaunchId,
Object.assign(
{
endTime: new Date().valueOf(),
},
this.launchStatus && { status: this.launchStatus },
),
);

const finishLaunchPromise = basePromise

Check failure on line 90 in lib/reporter.js

View workflow job for this annotation

GitHub Actions / test

Replace `⏎······.promise` with `.promise⏎······`
.promise.then(() => {
const { launch, isLaunchMergeRequired } = this.config.reporterOptions;
if (isLaunchMergeRequired) {
Expand Down
Loading