Skip to content

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

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

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

Conversation

@nohwnd

@nohwnd nohwnd commented Apr 3, 2026

Copy link
Copy Markdown
Member

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

nohwnd commented Apr 3, 2026

Copy link
Copy Markdown
Member Author

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

nohwnd commented Apr 3, 2026

Copy link
Copy Markdown
Member Author

🤖 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