[PR #1139] [MERGED] Flush input queue before running test. #1137 #24497

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/1139
Author: @miniksa
Created: 6/4/2019
Status: ✅ Merged
Merged: 6/4/2019
Merged by: @miniksa

Base: master ← Head: miniksa-input-core-failure


📝 Commits (1)

📊 Changes

1 file changed (+6 additions, -2 deletions)

View changed files

📝 src/host/ft_host/API_InputTests.cpp (+6 -2)

📄 Description

Summary of the Pull Request

Flushes the input queue on RawReadUnpacksCoalescedInputRecords test to ensure that other tests cannot cause failure by leaving extraneous input records behind after they run.

PR Checklist

  • Closes #1137 and internal issue MSFT: 21918618
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #1137

Detailed Description of the Pull Request / Additional comments

This only failed in the core operating system gate tests. This is because those tests run a subset of the complete test suite (subtracting the ones that do not make sense in a core environment). Apparently one of the tests that was skipped that normally runs prior to the UnpacksCoalesced test ensured that the input queue was clean enough for this test to succeed. But in the core environment, the test that ran prior left stuff behind.

To resolve this, I'm making the Coalesced test more resilient by cleaning out the queue prior to performing its operations.

(Also, bonus, I'm fixing the typo in the name Coalesced.)

This is less complicated/expensive than tracking down the tests that are leaving garbage behind, should prevent issues in the future related to ordering (since the tests run alphabetically, by default), and isn't as expensive as running the test in isolation (with its own conhost stood up for just the one test.)

Validated by running te.exe Microsoft.Console.Host.FeatureTests.dll /name:*InputTests* against a core operating system variant. Prior to change, this test failed. After the change, this test succeeded.

This will be automatically double-checked by the gates run after check-in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/1139 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 6/4/2019 **Status:** ✅ Merged **Merged:** 6/4/2019 **Merged by:** [@miniksa](https://github.com/miniksa) **Base:** `master` ← **Head:** `miniksa-input-core-failure` --- ### 📝 Commits (1) - [`8c7400b`](https://github.com/microsoft/terminal/commit/8c7400bd1077b54eca911583da5daa1285561484) Flush input queue before running test. #1137 ### 📊 Changes **1 file changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/host/ft_host/API_InputTests.cpp` (+6 -2) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Flushes the input queue on `RawReadUnpacksCoalescedInputRecords` test to ensure that other tests cannot cause failure by leaving extraneous input records behind after they run. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #1137 and internal issue MSFT: 21918618 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [x] Requires documentation to be updated * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #1137 <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments This only failed in the core operating system gate tests. This is because those tests run a subset of the complete test suite (subtracting the ones that do not make sense in a core environment). Apparently one of the tests that was skipped that normally runs prior to the `UnpacksCoalesced` test ensured that the input queue was clean enough for this test to succeed. But in the core environment, the test that ran prior left stuff behind. To resolve this, I'm making the `Coalesced` test more resilient by cleaning out the queue prior to performing its operations. (Also, bonus, I'm fixing the typo in the name `Coalesced`.) This is less complicated/expensive than tracking down the tests that are leaving garbage behind, should prevent issues in the future related to ordering (since the tests run alphabetically, by default), and isn't as expensive as running the test in isolation (with its own conhost stood up for just the one test.) Validated by running `te.exe Microsoft.Console.Host.FeatureTests.dll /name:*InputTests*` against a core operating system variant. Prior to change, this test failed. After the change, this test succeeded. This will be automatically double-checked by the gates run after check-in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:03:39 +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#24497