Skip to content

Fix #2657: Optimize Clear-TestDrive to delete only root new items#2696

Draft
nohwnd wants to merge 1 commit intopester:mainfrom
nohwnd:fix-2657-testdrive
Draft

Fix #2657: Optimize Clear-TestDrive to delete only root new items#2696
nohwnd wants to merge 1 commit intopester:mainfrom
nohwnd:fix-2657-testdrive

Conversation

@nohwnd
Copy link
Copy Markdown
Member

@nohwnd nohwnd commented Apr 3, 2026

Fix #2657

Clear-TestDrive was extremely slow with many files because it called Remove-Item on every individual file. Replaced with HashSet-based approach that only calls Remove-Item -Recurse on root new items.

Copilot-generated fix.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

@nohwnd
Copy link
Copy Markdown
Member Author

nohwnd commented Apr 3, 2026

tests

Copilot-generated fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nohwnd nohwnd force-pushed the fix-2657-testdrive branch from 01f0016 to 54a0788 Compare April 3, 2026 10:19
@nohwnd
Copy link
Copy Markdown
Member Author

nohwnd commented Apr 3, 2026

🤖 Tests added in latest push — verifies baseline preservation, no-op on clean, and nested directory cleanup.

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.

Pester clears test drives inefficiently

1 participant