Skip to content

Fix #2657 and #2649: Clear-TestDrive performance and NUnit3 ToString crash#2688

Closed
nohwnd wants to merge 1 commit into
pester:mainfrom
nohwnd:fix-testdrive-nunit
Closed

Fix #2657 and #2649: Clear-TestDrive performance and NUnit3 ToString crash#2688
nohwnd wants to merge 1 commit into
pester:mainfrom
nohwnd:fix-testdrive-nunit

Conversation

@nohwnd

@nohwnd nohwnd commented Apr 3, 2026

Copy link
Copy Markdown
Member

Pester 6 Fixes (Copilot-generated)

Fix #2657: Clear-TestDrive performance

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.

Fix #2649: NUnit3 ToString crash protection

NUnit3 report writing crashed when a test output object's ToString() method throws. Wrapped in try/catch with a descriptive fallback string.

All 2154 tests pass locally.

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

…t3 ToString crash

pester#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.

pester#2649: NUnit3 report writing crashed when a test output objects ToString()
throws. Wrapped in try/catch with a descriptive fallback string.

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

both look okay, not sure why you put it in the same PR, split to two.

@nohwnd

nohwnd commented Apr 3, 2026

Copy link
Copy Markdown
Member Author

Superseded by individual PRs per review feedback. Each fix now has its own PR (#2689-#2697).

@nohwnd nohwnd closed this Apr 3, 2026
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 Error during handling of output-element with state based ToString() Implementation

1 participant