You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wait for .NET to hear each opening of the typed confirmation - #189
DialogTests.ATypedConfirmationOpensOnItsFieldAndAnIncorrectNameCannotConfirm left the typed confirmation open after its confirm, now and then, in server and WebAssembly.
Cause
Reproduced in a Linux container with the CPU held to 1.5 cores and the dialog tests running side by side (1 failure in 6 runs, then 1 in 10), and traced on the page:
757 key Enter 763 open (the second opening)
774–814 the name typed
860 key Enter 861 submit
868 toggle open 868 report {"sequence":2,"open":true}
970 data-fl-overlay-open=1:2
The browser reports an opening with the toggle event, a task after it. The keys the test sent at once held that task back until after the confirm, so .NET heard the confirm (which closes the dialog) first and the opening after it, and its model ended open. Record 0006 accepts this order: "A host that closes an overlay in the same moment as the page opens it may hear the opening after its own render; the model then says what holds." No person types a name and confirms inside that gap.
Change
The test waits for .NET to hear each opening (HeardAsync, 1:1 and then 1:2) before it types, as #175 did for the sibling test. No timeout raised, no retry, no assertion changed. The component is not changed.
Checks
Server mode, the test alone, 30 runs in a row: 30 passed (Windows, Chromium). It had passed 30 of 30 there before the change too, so this machine alone does not show the fault.
Linux container, 1.5 cores, DialogTests in server and WebAssembly, 20 runs: 0 failures (before the change: 1 in 6, 1 in 10).
WebAssembly, the test alone, 10 runs: 10 passed. DialogTests in the three modes: 24 passed, 1 skipped.
Review by a fresh agent on the diff and #187: no problem of substance. It confirmed the values 1:1 and 1:2 in both interactive modes (the close made by the model is not reported back), that the wait cannot pass before .NET heard the opening or hang, and that no other test of the file types right after an opening without a guard (the explicit published-site test is the only one with just SettledAsync; it does not run in CI). It also traced the exact path: the submit reaches .NET while its model is already closed, so it changes nothing, and the late report then opens the model. Its two nits on the comment are done: the reason now sits on the second wait, which is the one that cures the race, and says that the late opening is what leaves the dialog open.
The second commit moves the comment only. Re-checked on it after a clean build: DialogTests in the three modes 24 passed, 1 skipped; the test alone in server mode 30 of 30.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DialogTests.ATypedConfirmationOpensOnItsFieldAndAnIncorrectNameCannotConfirmleft the typed confirmation open after its confirm, now and then, in server and WebAssembly.Cause
Reproduced in a Linux container with the CPU held to 1.5 cores and the dialog tests running side by side (1 failure in 6 runs, then 1 in 10), and traced on the page:
The browser reports an opening with the
toggleevent, a task after it. The keys the test sent at once held that task back until after the confirm, so .NET heard the confirm (which closes the dialog) first and the opening after it, and its model ended open. Record 0006 accepts this order: "A host that closes an overlay in the same moment as the page opens it may hear the opening after its own render; the model then says what holds." No person types a name and confirms inside that gap.Change
The test waits for .NET to hear each opening (
HeardAsync,1:1and then1:2) before it types, as #175 did for the sibling test. No timeout raised, no retry, no assertion changed. The component is not changed.Checks
DialogTestsin server and WebAssembly, 20 runs: 0 failures (before the change: 1 in 6, 1 in 10).DialogTestsin the three modes: 24 passed, 1 skipped.dotnet build -c Release -warnaserror: 0 warnings, 0 errors.Closes #187