[PR #8534] Fix the feature tests with a retry #27227

Open
opened 2026-01-31 09:20:44 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/8534

State: closed
Merged: Yes


A bunch of our feature tests don't work reliably in CI. They rely on creating a new OpenConsole.exe window, then running the test in that console. As a part of that test setup, the test runner used to wait a second to attach to the newly created console. Then the test goes on it's merry way, assuming the console is ready to go. However, in CI, that might take more than a second. If it does, then the test would fail pretty immediately, as soon as it tries to get at the buffer of the new console.

This PR introduces a little retry loop to the test init. After attaching to the new console, we'll try and get at the screen buffer. If that fails, we'll wait a second and try again. We'll try 5 times total, before bailing entirely. Hopefully, this should mitigate most of the random CI failures we get in the feature tests.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/8534 **State:** closed **Merged:** Yes --- A bunch of our feature tests don't work reliably in CI. They rely on creating a new `OpenConsole.exe` window, then running the test _in that console_. As a part of that test setup, the test runner used to wait a second to attach to the newly created console. Then the test goes on it's merry way, assuming the console is ready to go. However, in CI, that might take more than a second. If it does, then the test would fail pretty immediately, as soon as it tries to get at the buffer of the new console. This PR introduces a little retry loop to the test init. After attaching to the new console, we'll try and get at the screen buffer. If that fails, we'll wait a second and try again. We'll try 5 times total, before bailing entirely. Hopefully, this should mitigate most of the random CI failures we get in the feature tests. * [x] Closes #8495
claunia added the pull-request label 2026-01-31 09:20:44 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27227