Remove cancellation token from CopyResultsAsync#1461
Merged
kotlarmilos merged 2 commits intodotnet:mainfrom Aug 27, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes the cancellation token parameter from the CopyResultsAsync method to prevent premature termination when using the --signal-app-end feature. The issue was that the same cancellation token was shared between app termination and result copying, causing the copy operation to be cancelled when the app was terminated.
Key changes:
- Removed
CancellationTokenparameter fromCopyResultsAsyncmethod signature - Updated all method calls to not pass the cancellation token
- Modified the underlying process execution to not use cancellation token
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Microsoft.DotNet.XHarness.iOS.Shared/IResultFileHandler.cs |
Removed cancellation token parameter from interface method signature |
src/Microsoft.DotNet.XHarness.iOS.Shared/ResultFileHandler.cs |
Removed cancellation token parameter from implementation and process execution call |
src/Microsoft.DotNet.XHarness.Apple/AppOperations/AppTester.cs |
Updated method calls to remove cancellation token argument |
tests/Microsoft.DotNet.XHarness.iOS.Shared.Tests/ResultFileHandlerTests.cs |
Updated all test method calls to remove cancellation token argument |
rolfbjarne
approved these changes
Aug 26, 2025
matouskozak
approved these changes
Aug 27, 2025
kotlarmilos
added a commit
to kotlarmilos/xharness
that referenced
this pull request
Mar 16, 2026
* Remove cancellation token from CopyResultsAsync * Remove null argument
kotlarmilos
added a commit
to kotlarmilos/xharness
that referenced
this pull request
Mar 16, 2026
* Remove cancellation token from CopyResultsAsync * Remove null argument
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR removes the cancellation token from
CopyResultsAsync. When--signal-app-endis used, the same cancellation token was shared, which caused the copy command to terminate as soon as the app was terminated.The copy command is considered deterministic and does not require a cancellation token.