runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[wasm][debugger] Fix some racy tests

Open radical opened this issue 3 years ago • 2 comments

1. Fix random HotReload test failures

Some of the hot reload tests fail randomly because they call the updated methods too early. The tests used Thread.Sleep(3000) to wait for the method to get updated, and the proxy to respond to that. And that's essentially racy.

Instead, wait for the breakpointResolved event, or the scriptParsed events for the methods, as appropriate.

Fixes https://github.com/dotnet/runtime/issues/66024 Fixes https://github.com/dotnet/runtime/issues/72946

2. Fix race in adding/removing event handlers

Use ConcurrentDictionary for event listeners, and notification handlers, since they can be modified from different threads.

Fixes https://github.com/dotnet/runtime/issues/69144 .

radical avatar Aug 07 '22 05:08 radical

Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.

Issue Details

Some of the hot reload tests fail randomly because they call the updated methods too early. The tests used Thread.Sleep(3000) to wait for the method to get updated, and the proxy to respond to that. And that's essentially racy.

Instead, wait for the breakpointResolved event, or the scriptParsed events for the methods, as appropriate.

Fixes https://github.com/dotnet/runtime/issues/66024 .

Author: radical
Assignees: -
Labels:

arch-wasm, area-Debugger-mono, test-failure

Milestone: -

msftbot[bot] avatar Aug 07 '22 05:08 msftbot[bot]

The debugger test failure is https://github.com/dotnet/runtime/issues/73528 .

radical avatar Aug 07 '22 11:08 radical