Title: Fix/Skip/Remove Flaky Tests · Issue #21274 · PowerShell/PowerShell · GitHub
Open Graph Title: Fix/Skip/Remove Flaky Tests · Issue #21274 · PowerShell/PowerShell
X Title: Fix/Skip/Remove Flaky Tests · Issue #21274 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/21274
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix/Skip/Remove Flaky Tests","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\nWhen submitting a PR there are some tests which are currently only sometimes passing and can potentially fail. This is incredibly frustrating for people submitting PRs because it looks like your PR is failing and could give a false impression that the PR is breaking something when it isn't or is not ready for review. It is also only possible to close and reopen your PR which runs the whole test suite again which could then encounter another flaky test and just wastes time to run.\r\n\r\nEither these tests should be fixed up so they can run consistently without failure or skipped/removed because a sometimes failing test is worse than no test at all.\r\n\r\nThree tests that I've consistently come across as flaky are:\r\n\r\n+ [Test-Connection.MTUSizeDetect.MTUSizeDetect works](https://github.com/PowerShell/PowerShell/blob/338d1dcfa1ed6369980cc2b8c953aa73b1f86bfc/test/powershell/Modules/Microsoft.PowerShell.Management/Test-Connection.Tests.ps1#L264-L280) - https://dev.azure.com/powershell/PowerShell/_build/results?buildId=145814\u0026view=ms.vss-test-web.build-test-results-tab\u0026runId=2175688\u0026resultId=107348\u0026paneView=debug\r\n\r\n```\r\nValue cannot be null. (Parameter 'replyResult')\r\n\r\nat \u003cScriptBlock\u003e, /Users/runner/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Management/Test-Connection.Tests.ps1: line 274\r\n274: $result = Test-Connection $testAddress -MtuSize\r\n```\r\n\r\n+ [Clipboard cmdlet tests.Text.Get-Clipboard returns what is in Set-Clipboard](https://github.com/PowerShell/PowerShell/blob/338d1dcfa1ed6369980cc2b8c953aa73b1f86bfc/test/powershell/Modules/Microsoft.PowerShell.Management/Clipboard.Tests.ps1#L19-L23) - https://dev.azure.com/powershell/PowerShell/_build/results?buildId=145814\u0026view=ms.vss-test-web.build-test-results-tab\u0026runId=2175688\u0026resultId=107348\u0026paneView=debug\r\n\r\n```\r\nProcess must exit before requested information can be determined.\r\n\r\nat \u003cScriptBlock\u003e, /Users/runner/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Management/Clipboard.Tests.ps1: line 21\r\n21: Set-Clipboard -Value $guid\r\n``` \r\n\r\n+ [Group policy settings tests.Group policy settings tests.Module logging policy test](https://github.com/PowerShell/PowerShell/blob/338d1dcfa1ed6369980cc2b8c953aa73b1f86bfc/test/powershell/engine/Basic/GroupPolicySettings.Tests.ps1#L59-L107) - https://dev.azure.com/powershell/PowerShell/_build/results?buildId=145862\u0026view=ms.vss-test-web.build-test-results-tab\u0026runId=2175951\u0026resultId=100001\u0026paneView=debug\r\n\r\n```\r\nExpected $true, but got $false.\r\n\r\nat \u003cScriptBlock\u003e, D:\\a\\1\\s\\test\\powershell\\engine\\Basic\\GroupPolicySettings.Tests.ps1: line 94\r\n94: Should -BeTrue\r\n```\r\n\r\n### Expected behavior\r\n\r\n```console\r\nTests pass consistently\r\n```\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\nSome tests fail\r\n```\r\n\r\n\r\n### Error details\r\n\r\n_No response_\r\n\r\n### Environment data\r\n\r\n```powershell\r\nCI\r\n```\r\n\r\n\r\n### Visuals\r\n\r\n_No response_","author":{"url":"https://github.com/jborean93","@type":"Person","name":"jborean93"},"datePublished":"2024-02-26T23:43:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/21274/PowerShell/issues/21274"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b52b1bcc-a11d-210e-74d8-b7b15d9d5214 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 87DA:36FCBE:79F0E1:B1AC09:6A5616E6 |
| html-safe-nonce | 174381606d6d9c3d5634e551eea99a0310190927a0ee4fb74e8f921e2eabaed5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4N0RBOjM2RkNCRTo3OUYwRTE6QjFBQzA5OjZBNTYxNkU2IiwidmlzaXRvcl9pZCI6Ijg4NzQxMzIwMTcxMTk2MzEwNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 65c22f70d947cf957896824be85e621ccf40d1ae3516a4a2adc2656a52ddbc4a |
| hovercard-subject-tag | issue:2155367859 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/21274/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9f038e1cb7bf077ee3aced69b5dd895bf8ed4b11d6b862da58d5b4095d0b9b37/PowerShell/PowerShell/issues/21274 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9f038e1cb7bf077ee3aced69b5dd895bf8ed4b11d6b862da58d5b4095d0b9b37/PowerShell/PowerShell/issues/21274 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jborean93 |
| hostname | github.com |
| expected-hostname | github.com |
| None | f4368738fc918fecd9b3958f6b49218bbe60d4185f38e72e3954e11f1ad0213a |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b76b9cc70d30da50674184c9c66c56423fd0b93c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width