Skip to content

[browser][WBT] fix BlazorEventPipeTestWithMetrics test #116334

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
Jun 5, 2025

Conversation

pavelsavara
Copy link
Member

Fixes #116303

  • Adding <EventSourceSupport>true</EventSourceSupport><MetricsSupport>true</MetricsSupport> to the test.
  • small cleanup

@pavelsavara pavelsavara added this to the 10.0.0 milestone Jun 5, 2025
@pavelsavara pavelsavara requested a review from akoeplinger June 5, 2025 10:55
@pavelsavara pavelsavara self-assigned this Jun 5, 2025
@Copilot Copilot AI review requested due to automatic review settings June 5, 2025 10:55
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Diagnostics-mono os-browser Browser variant of arch-wasm labels Jun 5, 2025
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 enables event source and metrics support in the BlazorEventPipe test and cleans up repetitive assertions by using loops over expected items.

  • Adds <EventSourceSupport> and <MetricsSupport> flags to the test project properties.
  • Refactors long chains of Assert.True calls into loops over expected-instrument and expected-event arrays.
Comments suppressed due to low confidence (1)

src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs:210

  • The assertion message still references "metrics.nettrace", but this block is validating events from "gcdump.nettrace". Update the message to reflect the correct trace type.
Assert.True(actualEvents.ContainsKey(expectedEvent), $"The metrics.nettrace should contain event: {expectedEvent}");

@pavelsavara pavelsavara enabled auto-merge (squash) June 5, 2025 13:53
@pavelsavara pavelsavara merged commit d47f2b9 into dotnet:main Jun 5, 2025
30 checks passed
@pavelsavara pavelsavara deleted the issue_116303 branch June 5, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Diagnostics-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[browser] disabled test - Wasm.Build.Tests.Blazor.EventPipeDiagnosticsTests.BlazorEventPipeTestWithMetrics
3 participants