Skip to content

Remove cancellation token from CopyResultsAsync#1461

Merged
kotlarmilos merged 2 commits intodotnet:mainfrom
kotlarmilos:improvement/result-file-handler-cancellation-token
Aug 27, 2025
Merged

Remove cancellation token from CopyResultsAsync#1461
kotlarmilos merged 2 commits intodotnet:mainfrom
kotlarmilos:improvement/result-file-handler-cancellation-token

Conversation

@kotlarmilos
Copy link
Copy Markdown
Member

Description

This PR removes the cancellation token from CopyResultsAsync. When --signal-app-end is 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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CancellationToken parameter from CopyResultsAsync method 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

@kotlarmilos kotlarmilos merged commit dbb478b into dotnet:main Aug 27, 2025
17 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants