Skip to content

[Blazor] Improve the reliability of 'JSInteropThrowsInUserCode' #15219

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
Oct 21, 2019

Conversation

javiercn
Copy link
Member

  • Moves the Dispose logic into DisposeAsync instead
    of IAsyncLifetime.DisposeAsync.
  • Adds a try{...}catch{...} around output.WriteLine to prevent
    situations where writing a log into the ITestOutput outside of the
    context of the test causes an exception that makes the test fail.

Addresses https://github.com/aspnet/AspNetCore-Internal/issues/3162

* Moves the Dispose logic into `DisposeAsync` instead
  of `IAsyncLifetime.DisposeAsync`.
* Adds a `try{...}catch{...}` around output.WriteLine to prevent
  situations where writing a log into the ITestOutput outside of the
  context of the test causes an exception that makes the test fail.
@javiercn javiercn requested a review from pranavkm October 21, 2019 13:04
@javiercn javiercn added the area-blazor Includes: Blazor, Razor Components label Oct 21, 2019
@javiercn javiercn merged commit 394445f into release/3.1 Oct 21, 2019
@javiercn javiercn deleted the javiercn/js-interop-test-fix branch October 21, 2019 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants