Skip to content

Commit

Permalink
fix(AnWeber/vscode-httpyac#323): add skipped test result on user canc…
Browse files Browse the repository at this point in the history
…ellation
  • Loading branch information
AnWeber committed Nov 3, 2024
1 parent 6e24065 commit 7905f2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
### Fix
- handle dom parser exception for invalid xml (#821)
- do not log stack on assertions error (AnWeber/vscode-httpyac#338)

- only clear output channel for test runs (AnWeber/vscode-httpyac#337)
- add skipped test result on user cancellation (AnWeber/vscode-httpyac#323)

## [6.16.3] (2024-10-30)

Expand Down
2 changes: 2 additions & 0 deletions src/utils/requestClientUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { mergeResponses, repeat } from './repeatUtils';
import { toString } from './stringUtils';
import { deleteVariableInContext, setVariableInContext } from './variableUtils';
import { v4 } from 'uuid';
import { addSkippedTestResult } from './testUtils';

export function executeRequestClientFactory<T extends models.RequestClient>(
requestClientFactory: (request: models.Request, context: models.ProcessorContext) => T,
Expand Down Expand Up @@ -106,6 +107,7 @@ function toResponses(...responses: Array<models.HttpResponse | void | undefined>
function registerCancellation<T extends models.RequestClient>(client: T, context: models.ProcessorContext) {
if (context.progress?.register) {
return context.progress?.register(() => {
addSkippedTestResult(context.httpRegion, 'user cancellation');
client.disconnect(new Error('user cancellation'));
});
}
Expand Down

0 comments on commit 7905f2d

Please sign in to comment.