Skip to content

[browser] fix WBT EventPipeDiagnosticsTests timing#123977

Merged
pavelsavara merged 16 commits intodotnet:mainfrom
pavelsavara:fix_ep_test
Feb 9, 2026
Merged

[browser] fix WBT EventPipeDiagnosticsTests timing#123977
pavelsavara merged 16 commits intodotnet:mainfrom
pavelsavara:fix_ep_test

Conversation

@pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Feb 4, 2026

Fix: do let Playwright await promises - it blocks EP.
Other:

  • Adds mono/clr prefix for tests to easier differentiate where the job was running.
  • Renames generic CpuProfileTest local methods to convey work they're doing.
  • Refactor SetupCounterPage to decrease complexity of passes arguments.
  • Increased durationSeconds 2->5 for sampling.

@pavelsavara pavelsavara added this to the 11.0.0 milestone Feb 4, 2026
@pavelsavara pavelsavara self-assigned this Feb 4, 2026
@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Feb 4, 2026
Copilot AI review requested due to automatic review settings February 4, 2026 00:53
@pavelsavara pavelsavara added area-Diagnostics-mono os-browser Browser variant of arch-wasm labels Feb 4, 2026
Copy link
Contributor

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 addresses timing issues in the EventPipeDiagnosticsTests for WebAssembly builds by introducing delays to ensure proper event sequencing and test reliability.

Changes:

  • Modified the IncrementCount method in the Counter page to be asynchronous with a 1ms delay
  • Added a 500ms delay before exit in the test to ensure diagnostic upload completes

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/mono/wasm/testassets/BlazorBasicTestApp/App/Pages/Counter.razor Changed IncrementCount to async method with minimal delay
src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs Added delay before exit to allow diagnostic upload to complete

@pavelsavara pavelsavara marked this pull request as ready for review February 4, 2026 10:26
@ilonatommy
Copy link
Member

What does this fix? I cannot see any issues on EventPipeDiagnosticsTests

@pavelsavara

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings February 4, 2026 15:26
Copy link
Contributor

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@ilonatommy
Copy link
Member

Here we go again log The cpuprofile.nettrace should contain stack frames for the 'Counter.IncrementCount' method

Copilot AI review requested due to automatic review settings February 5, 2026 11:22
Copy link
Contributor

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Copilot AI review requested due to automatic review settings February 5, 2026 11:44
Copy link
Contributor

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings February 6, 2026 13:07
Copy link
Contributor

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

# Conflicts:
#	src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs
Copilot AI review requested due to automatic review settings February 6, 2026 18:51
Copy link
Contributor

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

@pavelsavara
Copy link
Member Author

Log

[log] globalThis.collectAndUpload method created 2026-02-06T20:19:52.706Z
[log] Tracing cpuprofile.nettrace started 2026-02-06T20:19:52.711Z
Installed script: 2026-02-06T20:19:52.7136993+00:00
[log] Incrementing count: 0 2026-02-06T20:19:52.7820000+00:00
[log] Incrementing count: 50 2026-02-06T20:19:52.7970000+00:00
[log] Button clicked at 2/6/2026 8:19:52 PM
[log] Incrementing count: 0 2026-02-06T20:19:52.8940000+00:00
[log] Incrementing count: 50 2026-02-06T20:19:52.8960000+00:00
[log] Button clicked at 2/6/2026 8:19:52 PM
[log] Incrementing count: 0 2026-02-06T20:19:52.9470000+00:00
[log] Incrementing count: 50 2026-02-06T20:19:52.9500000+00:00
[log] Button clicked at 2/6/2026 8:19:52 PM
[log] Incrementing count: 0 2026-02-06T20:19:52.9960000+00:00
[log] Incrementing count: 50 2026-02-06T20:19:52.9990000+00:00
[log] Button clicked at 2/6/2026 8:19:53 PM
[log] Incrementing count: 0 2026-02-06T20:19:53.0510000+00:00
[log] Incrementing count: 50 2026-02-06T20:19:53.0530000+00:00
[log] Button clicked at 2/6/2026 8:19:53 PM
Done clicking: 2026-02-06T20:19:53.0829647+00:00
[log] Tracing done 2026-02-06T20:19:57.764Z
[log] File cpuprofile.nettrace size to upload: 2579042 bytes 2026-02-06T20:19:57.767Z
[log] File uploaded successfully: 2026-02-06T20:19:57.859Z
[log] Shutting down: 2026-02-06T20:19:58.861Z
[log] WASM EXIT 0

Copilot AI review requested due to automatic review settings February 7, 2026 02:19
Copy link
Contributor

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

@pavelsavara pavelsavara merged commit c5d013a into dotnet:main Feb 9, 2026
41 of 42 checks passed
@pavelsavara pavelsavara deleted the fix_ep_test branch February 9, 2026 10:59
<WorkItemPrefix Condition="'$(WasmEnableWebcil)' == 'false'">NoWebcil-</WorkItemPrefix>
<WorkItemPrefix Condition="'$(WasmFingerprintAssets)' == 'false'">NoFingerprint-</WorkItemPrefix>
<WorkItemPrefix Condition="'$(WasmBundlerFriendlyBootConfig)' == 'true'">JavascriptBundler-</WorkItemPrefix>
<WorkItemPrefix Condition="'$(TestUsingWorkloads)' == 'true'">WBT-Workloads-</WorkItemPrefix>
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need the info here as well?

RuntimeFlavor is carried in separate Helix property as well as Scenario=WBT

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

That's interesting, thank you.

Could we unify WBT/BuildWasmApps?
Do we have mono/coreclr prefixes for lib tests as well?
Should we include OS as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

4 participants