Fix flaky Emacs e2e test: replace fixed sleep with diagnostic polling loop#2276
Merged
andyleejordan merged 2 commits intoupdatesfrom Apr 8, 2026
Merged
Conversation
Agent-Logs-Url: https://github.com/PowerShell/PowerShellEditorServices/sessions/19f2e25d-3a5e-4570-97bf-ce36493b9795 Co-authored-by: andyleejordan <2226434+andyleejordan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix timing issue in powershell-editor-services test
Fix flaky Emacs e2e test: replace fixed sleep with diagnostic polling loop
Apr 8, 2026
andyleejordan
added a commit
that referenced
this pull request
Apr 8, 2026
* One more round of package updates * Update test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix flaky Emacs e2e test: replace fixed sleep with diagnostic polling loop (#2276) * Initial plan * Fix timing issue in Emacs test by polling for flymake diagnostics Agent-Logs-Url: https://github.com/PowerShell/PowerShellEditorServices/sessions/19f2e25d-3a5e-4570-97bf-ce36493b9795 Co-authored-by: andyleejordan <2226434+andyleejordan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: andyleejordan <2226434+andyleejordan@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.
The
powershell-editor-servicesEmacs test was non-deterministically failing because it relied on a hardcoded(sleep-for 5)before checking for flymake diagnostics — insufficient when the LSP server publishes diagnostics slowly. The TODO comment in the code acknowledged this.Changes
test/emacs-test.el: Replace(sleep-for 5)with a polling loop that waits up to 30 seconds (in 0.5s increments) forflymake-diagnosticsto become non-nil before proceeding withflymake-goto-next-errorand the face assertion.Original prompt
This pull request was created from Copilot chat.