Skip to content

Add TestFailingCompletionHandlerCrashesProcess Test - #2309

Open
kythant wants to merge 2 commits into
staging/3.0from
user/kythant/TestFailingCompletionHandlerCrashesProcess
Open

Add TestFailingCompletionHandlerCrashesProcess Test#2309
kythant wants to merge 2 commits into
staging/3.0from
user/kythant/TestFailingCompletionHandlerCrashesProcess

Conversation

@kythant

@kythant kythant commented Mar 2, 2026

Copy link
Copy Markdown

No description provided.

Comment thread src/Tests/UnitTest/TestComponentCSharp_Tests.cs Outdated
@Sergio0694
Sergio0694 force-pushed the user/kythant/TestFailingCompletionHandlerCrashesProcess branch from 67f1e18 to 9d721c8 Compare June 19, 2026 21:16
@Sergio0694
Sergio0694 force-pushed the user/kythant/TestFailingCompletionHandlerCrashesProcess branch from 613b23f to 33cefde Compare July 31, 2026 20:43
@Sergio0694
Sergio0694 enabled auto-merge (squash) July 31, 2026 20:49
kythant and others added 2 commits July 31, 2026 15:22
The previous test asserted that the process survives a 'Completed' handler
failing with 'E_FAIL', which is the opposite of the intended behavior: any
'HRESULT' outside the well known disconnect allow-list is rethrown on the
thread pool by 'ExceptionDispatchInfoExtensions.ThrowAsync', tearing down
the process. That made the test fail by killing the whole unit test run.

Cover the behavior that was actually implemented instead (see #1969 and
#2399/#2400), ie. that failures from a completion handler indicating the peer
process is gone are swallowed. The test component now takes the 'HRESULT'
to fail with, and exposes a flag set right before the handler throws, so
the test can wait for the handler deterministically.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0ad9ec63-3e5f-4e9a-be7f-e1769e060136
@Sergio0694
Sergio0694 force-pushed the user/kythant/TestFailingCompletionHandlerCrashesProcess branch from 33cefde to a89a091 Compare July 31, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants