Fix flaky workloadIdentityCredentialIdentityBinding test on Windows #36745
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.
Packages impacted by this PR
Issues associated with this PR
Describe the problem that is addressed by this PR
Test
should use custom token endpoint with CA file configurationfails intermittently on Windows withENOTEMPTY: directory not empty, rmdir. The "Certificate Validation & Processing" tests usedfs.unlink()+fs.rmdir()for temp directory cleanup, which fails on Windows due to timing issues with file handle releases.What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Replace the two-step cleanup with
fs.rm(tempDir, { recursive: true, force: true }). This is the same pattern already used elsewhere in this test file ("Configuration validation" and "Identity binding feature" sections).Are there test cases added in this PR? (If not, why?)
No new tests needed—this fixes existing test cleanup reliability.
Provide a list of related PRs (if any)
N/A
Command used to generate this PR:**(Applicable only to SDK release request PRs)
N/A
Checklists
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
login.microsoftonline.com/opt/hostedtoolcache/node/20.19.5/x64/bin/node /opt/hostedtoolcache/node/20.19.5/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/azure-sdk-for-js/azure-sdk-for-js/node_modules/.pnpm/[email protected]_@opentelemetry+[email protected]_@types+[email protected]_@types+[email protected]_@vitest_4be2d1158f082e5fc4d55edbc8c2e690/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/azure-sdk-for-js/azure-sdk-for-js/node_modules/.pnpm/[email protected]_@opentelemetry+[email protected]_@types+[email protected]_@types+[email protected]_@vitest_4be2d1158f082e5fc4d55edbc8c2e690/node_modules/vitest/dist/workers/forks.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.