Skip to content

Commit

Permalink
wip: addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
burivuhster committed Dec 19, 2024
1 parent 755ea2c commit 9cec618
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
IRunExecutionData,
IWorkflowExecutionDataProcess,
} from 'n8n-workflow';
import { NodeConnectionType, Workflow } from 'n8n-workflow';
import { ExecutionCancelledError, NodeConnectionType, Workflow } from 'n8n-workflow';
import assert from 'node:assert';
import { Service } from 'typedi';

Expand Down Expand Up @@ -306,6 +306,12 @@ export class TestRunnerService {
const aggregatedMetrics = metrics.getAggregatedMetrics();
await this.testRunRepository.markAsCompleted(testRun.id, aggregatedMetrics);
}
} catch (e) {
if (e instanceof ExecutionCancelledError) {
await this.testRunRepository.markAsCancelled(testRun.id);
} else {
throw e;
}
} finally {
// Clean up abort controller
this.abortControllers.delete(testRun.id);
Expand Down

0 comments on commit 9cec618

Please sign in to comment.