Repository navigation
test: cover native instance lifecycle and retries - #9
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does
Adds four native Windows cases around the production instance claim, retry and guard code: primary/secondary lifecycle, retry exhaustion, reclaim after the owner closes at the second probe, and the one-probe minimum for zero attempts. Each case uses a unique local GUID mutex, a fail-closed test-only name provider, and verifies final object removal. The development guide lists the focused target.
Why
The existing classifiers cover return-code decisions. These cases also exercise real Win32 handles and guard cleanup while keeping the protection runtime and production mutex names out of the fixture.
How it was tested
ecd92460c65466caf8989601fdc4edc8db49c133, with the native PowerRequest acquisition test explicitly excluded.An earlier local aggregate invocation reached its watchdog inside the unchanged status IPC test; that target subsequently passed in isolation and the later aggregate passed. The historical cause remains unknown. This patch changes neither production IPC nor its tests and claims no fix for that timeout. Live elevated relaunch, cross-token/process interactions and physical power transitions were not validated locally.
Checklist
mainatb63c2e9da1f6112ecd602a2f40310421bfd041bcand targetsmainso its diff contains only the native mutex test and seven documentation lines. The olderdevtip would include unrelated published changes.