Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix xharness #114746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2025
Merged

fix xharness #114746

merged 1 commit into from
Apr 16, 2025

Conversation

pavelsavara
Copy link
Member

fix fallout of dotnet/xharness#1388

Copy link
Contributor

@Copilot 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 aims to update the XHarness test runner to use asynchronous return types for writing test results in response to fallout from a previous change.

  • Updated WriteResultsToFile(XmlResultJargon) to return Task instead of a synchronous string.
  • Updated WriteResultsToFile(TextWriter, XmlResultJargon) to return Task instead of void.
Comments suppressed due to low confidence (2)

src/tests/Common/XHarnessRunnerLibrary/GeneratedTestRunner.cs:55

  • Although the method now returns a Task, it still performs synchronous file I/O. Consider using File.WriteAllTextAsync to fully support asynchronous operations.
File.WriteAllText(ResultsFileName, LastTestRun.GetTestResultOutput(_assemblyName));

src/tests/Common/XHarnessRunnerLibrary/GeneratedTestRunner.cs:72

  • The synchronous write call may block the execution thread even though the method returns a Task. If the TextWriter supports asynchronous operations, consider using WriteLineAsync.
writer.WriteLine(lastTestResults);

@pavelsavara pavelsavara merged commit 72a4c86 into dotnet:main Apr 16, 2025
69 of 73 checks passed
@pavelsavara pavelsavara deleted the fix_xharness branch April 16, 2025 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants