Skip to content

Fix flaky test on Windows CI#2880

Merged
nohwnd merged 4 commits into
pester:mainfrom
fflaten:fix-shaky-test
Jul 17, 2026
Merged

Fix flaky test on Windows CI#2880
nohwnd merged 4 commits into
pester:mainfrom
fflaten:fix-shaky-test

Conversation

@fflaten

@fflaten fflaten commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

PR Summary

Fixing a flaky output test because Windows might use seconds and not milliseconds.

Includes minor cleanup in output to remove whitespace between time and time suffix. Future PR should consider extracting Get-HumanTime from Output.ps1 to Pester.Utility.ps1 to get consistency.

PR Checklist

  • PR has meaningful title
  • Summary describes changes
  • PR is ready to be merged
    • If not, use the arrow next to Create Pull Request to mark it as a draft. PR can be marked Ready for review when it's ready.
  • Tests are added/update (if required)
  • Documentation is updated/added (if required)

@fflaten

fflaten commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

Future PR should consider extracting Get-HumanTime from Output.ps1 to Pester.Utility.ps1 to get consistency.

@nohwnd Thoughts? Any reason to keep some output hardcoded to milliseconds, or should I implement?

@fflaten
fflaten marked this pull request as ready for review July 16, 2026 17:21
@nohwnd

nohwnd commented Jul 17, 2026

Copy link
Copy Markdown
Member

We are probably already outputting human time in all the normal output, in the diag logs I am okay if it stays using just ms. Less overhead (no function call) and less complicated to write the message.

@nohwnd
nohwnd merged commit 0d020f9 into pester:main Jul 17, 2026
13 checks passed
@fflaten
fflaten deleted the fix-shaky-test branch July 17, 2026 06:28
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.

2 participants