Fix parallel run durations + data passing, Should-Invoke mock error name, and ForEach null suggestion#2796
Closed
nohwnd wants to merge 2 commits into
Closed
Fix parallel run durations + data passing, Should-Invoke mock error name, and ForEach null suggestion#2796nohwnd wants to merge 2 commits into
nohwnd wants to merge 2 commits into
Conversation
…h null suggestion Parallel runs summed container durations, so the totals overstated the wall-clock time. Use RunEnd - RunStart for the run duration and leave the per-phase totals blank in parallel mode. The not-found mock assertion now says Should-Invoke instead of Should -Invoke, and the empty/null -ForEach error points at both -AllowNullOrEmptyForEach and Run.FailOnNullOrEmptyForEach. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run.Parallel only sent each file path to its worker, so New-PesterContainer
-Path ... -Data @{ ... } lost its data and parametrized files failed discovery
on missing mandatory parameters. Rebuild a data-bearing container in the worker
when Data is present, otherwise run the path directly as before.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
Split into four focused PRs, one per issue, since these are independent fixes:
Closing this in favor of those. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Four recent 6.0.0 reports:
Run.Durationand leave the per-phase totals blank in parallel mode. Fix [v6 Parallel] Total durations are wrong #2794Run.Parallelsent only the file path to each worker, soNew-PesterContainer -Path … -Data @{…}dropped its data and parametrized files failed discovery on missing mandatory params. Workers now rebuild a data-bearing container when data is present. Fix Pass data to parallel runs #2793Should -Invoke. NowShould-Invoke. Fix Error message reference wrong command when tests useShould-Invoke#2792-ForEach— the throw now also points atRun.FailOnNullOrEmptyForEach, not just-AllowNullOrEmptyForEach. Fix Suggest local and global option for suppressing null in the failure #2782Added parallel duration + data tests and tightened the mock/ForEach tests. The 3 unrelated
SkipRemainingOnFailuretest failures are pre-existing on main.