Skip to content

Retry provider-test readiness reads while the receipt is temporarily locked - #1972

Merged
oznetmaster merged 2 commits into
nunit:mainfrom
oznetmaster:fix/provider-readiness-sharing-20261119
Nov 19, 2026
Merged

oznetmaster merged 2 commits into
nunit:mainfrom
oznetmaster:fix/provider-readiness-sharing-20261119

Conversation

@oznetmaster

@oznetmaster oznetmaster commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

TestAgentProviderServerTests waits for ready.xml to exist and then loads it outside
the readiness wait. An existing file can still be temporarily unreadable on
Windows, producing the intermittent sharing-violation failure reported by @CharliePoole.
The server already publishes the file through a closed temporary file and rename.

Read and retain the XML receipt inside the existing 15-second readiness wait.
Treat only native sharing/range-lock violations as temporarily not ready; malformed
XML and other I/O failures still propagate. Child-exit, PID and endpoint checks
remain in place. The readiness correction changes only test code and retains the existing timeout.

A separate commit updates the Engine API pin from beta.101.4 to beta.101.5,
addressing the package verification failure noted by @CharliePoole. The two API
source revisions differ only in the Cake tool version; API source, target
frameworks and package dependencies are unchanged. Package verification is retained.

Validation:

  • Five real-file controls pass on net462 and net10.0. Against the extracted old
    reader sequence, the two lock regressions fail on each runtime; the other three
    controls pass.
  • The complete required Test target passes, including all 11 provider-server
    integration cases per runtime. Engine: 506 passed, zero failed, eight existing
    skips on each target. All pre-existing per-case outcomes in all six assembly
    reports are unchanged, including existing Common warnings/inconclusive cases.
  • Repository build/header/analyzer checks and an independent process/temporary-
    directory audit pass. The unchanged-main test target also passed here; the
    natural intermittent failure and the identity of Charlie's file holder remain
    unproven. Controlled locking reproduces the vulnerable read without that assumption.

After updating the pin, build.ps1 --target=TestAll --target=BuildTestAndPackage
--nopush passes the build/header/analyzer checks, required and pending-acceptance
reporting targets, and verification/execution checks for all four packages.
All six required reports retain identical per-case outcomes.

The original readiness validation executed through build.ps1 --target=Test. With the pinned recipe, --test alone
selected only the Default/Build path in this checkout; both receipts are retained.

Prepared jointly by Neil Colvin and OpenAI Codex.

Keep the existing startup deadline and validate the parsed receipt.
Add real Windows sharing and range-lock regression controls.

Prepared jointly by Neil Colvin and OpenAI Codex.
@CharliePoole

Copy link
Copy Markdown
Member

@oznetmaster CI build failure due to dependabot update of engine api. I had to update Directory.Packages.props in my local build.

Align the Console package gate with Engine API 4.0.0-beta.101.5. The API source and package dependencies are unchanged; the new package follows the Cake tool update. Complete TestAll and BuildTestAndPackage validation passed.

Prepared jointly by Neil Colvin and OpenAI Codex.

Copy link
Copy Markdown
Collaborator Author

@CharliePoole Updated Directory.Packages.props to NUnit.Engine.Api 4.0.0-beta.101.5 in a separate commit, 7d0167f. The API source and package dependencies are unchanged between those releases; the only source difference is the Cake tool update.

The complete local TestAll and BuildTestAndPackage targets pass, including all package verification/execution checks. Hosted CI and CLA also pass on that exact commit. The six required hosted test reports have the same per-case outcomes as the local run, including 506 engine cases passed per runtime and the existing skips/warnings/inconclusive cases.

The description is current and there are no merge conflicts. Ready for your review; I have not merged it.

Prepared jointly by Neil Colvin and OpenAI Codex.

@CharliePoole CharliePoole left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Merged main passes all tests on my machine.

@CharliePoole

Copy link
Copy Markdown
Member

@oznetmaster You should be able to merge at this point. No need to request a second review.

@oznetmaster
oznetmaster merged commit ba4cf47 into nunit:main Nov 19, 2026
2 checks passed
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