chore: add debug logging to localize steps error (#8062)
This commit is contained in:
parent
3424f59e67
commit
b1dc84c953
|
|
@ -253,7 +253,11 @@ export class Dispatcher {
|
|||
});
|
||||
worker.on('stepEnd', (params: StepEndPayload) => {
|
||||
const { test, result, steps } = this._testById.get(params.testId)!;
|
||||
const step = steps.get(params.stepId)!;
|
||||
const step = steps.get(params.stepId);
|
||||
if (!step) {
|
||||
this._reporter.onStdErr?.('Internal error: step end without step begin: ' + params.stepId, test, result);
|
||||
return;
|
||||
}
|
||||
step.duration = params.wallTime - step.startTime.getTime();
|
||||
if (params.error)
|
||||
step.error = params.error;
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ export class WorkerRunner extends EventEmitter {
|
|||
},
|
||||
_testFinished: new Promise(f => testFinishedCallback = f),
|
||||
_addStep: (category: string, title: string) => {
|
||||
const stepId = `${category}@${++lastStepId}`;
|
||||
const stepId = `${category}@${title}@${++lastStepId}`;
|
||||
const payload: StepBeginPayload = {
|
||||
testId,
|
||||
stepId,
|
||||
|
|
|
|||
Loading…
Reference in a new issue