[PR #9192] [MERGED] A bunch of test fixes #27451

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9192
Author: @zadjii-msft
Created: 2/17/2021
Status: ✅ Merged
Merged: 2/18/2021
Merged by: @undefined

Base: main ← Head: dev/migrie/fix-tests-feb-2021


📝 Commits (5)

  • c6316e2 A bunch of test fixes
  • 18bed4e More test fixes I missed
  • 1c5b3b9 Add a helper for actually printing an hstring when the verify fails
  • aa06f4f Add this note, because hey this is maddening
  • 94cdab3 Ah heck, well, the test failure is gone now. False alarm.

📊 Changes

11 files changed (+157 additions, -33 deletions)

View changed files

📝 src/cascadia/LocalTests_SettingsModel/CommandTests.cpp (+0 -8)
📝 src/cascadia/LocalTests_SettingsModel/pch.h (+1 -0)
📝 src/cascadia/LocalTests_TerminalApp/TabTests.cpp (+41 -9)
📝 src/cascadia/LocalTests_TerminalApp/pch.h (+1 -0)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+3 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+26 -9)
📝 src/cascadia/TerminalApp/TerminalTab.cpp (+13 -7)
📝 src/cascadia/UnitTests_TerminalCore/pch.h (+1 -0)
📝 src/cascadia/ut_app/precomp.h (+2 -0)
📝 src/inc/consoletaeftemplates.hpp (+19 -0)
➕ src/inc/winrtTaefTemplates.hpp (+50 -0)

📄 Description

A bunch of our local tests regressed recently. I'm unsure as to when
this happened. Clearly, we all do a super good job of running these
tests 😄.

  • I had to make sure the call to AppLogic::CurrentAppSettings was
    try/caught, because that doesn't work in the tests
  • I had to make the Pointer* events take a weak pointer to the
    TerminalPage because for whatever reason, they'd be called at a
    weird point in the test init, causing the tests to fail. It was weird.
    Almost as if the TerminalPage had been released, but the test logs
    showed it hadn't barely been set up yet? Whatever, this fixes it.
  • The VerifyCommandPaletteTabSwitcherOrder test needed to take a time
    out, for reasons that are not totally clear to me. That one was flakey
    and I hate it.

Checklist:

  • Doesn't close anything, this is just something I noticed.
  • Doesn't require docs to be updated, it's test fixes
  • Yea, I ran the tests

/cc @Don-Vito: The FilteredCommandTests all crashed immediately for
me. I'm not sure what's causing that - I think everything we need for
those tests is set up right? The generated AppxManifest.xml had all
the right classes listed in it, I really can't be sure what was wrong
there. These tests aren't run in CI so it's not a super big deal, but I
thought I'd let you know.

(cherry picked from commit ccda434f69)


🔄 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/9192 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 2/17/2021 **Status:** ✅ Merged **Merged:** 2/18/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/fix-tests-feb-2021` --- ### 📝 Commits (5) - [`c6316e2`](https://github.com/microsoft/terminal/commit/c6316e2227dd30f8cba6ceb76407ceec6b7df79a) A bunch of test fixes - [`18bed4e`](https://github.com/microsoft/terminal/commit/18bed4ebedcf5eb77ac6a20528f6c1b12d6c5bfe) More test fixes I missed - [`1c5b3b9`](https://github.com/microsoft/terminal/commit/1c5b3b97e18813b293ef483f6c87949e39cc1f7a) Add a helper for actually printing an hstring when the verify fails - [`aa06f4f`](https://github.com/microsoft/terminal/commit/aa06f4fd71a8efcfb317db95188ac39c111fcbca) Add this note, because hey this is maddening - [`94cdab3`](https://github.com/microsoft/terminal/commit/94cdab32a350aeb7088540fc6876357aefab4a23) Ah heck, well, the test failure is gone now. False alarm. ### 📊 Changes **11 files changed** (+157 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/LocalTests_SettingsModel/CommandTests.cpp` (+0 -8) 📝 `src/cascadia/LocalTests_SettingsModel/pch.h` (+1 -0) 📝 `src/cascadia/LocalTests_TerminalApp/TabTests.cpp` (+41 -9) 📝 `src/cascadia/LocalTests_TerminalApp/pch.h` (+1 -0) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+3 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+26 -9) 📝 `src/cascadia/TerminalApp/TerminalTab.cpp` (+13 -7) 📝 `src/cascadia/UnitTests_TerminalCore/pch.h` (+1 -0) 📝 `src/cascadia/ut_app/precomp.h` (+2 -0) 📝 `src/inc/consoletaeftemplates.hpp` (+19 -0) ➕ `src/inc/winrtTaefTemplates.hpp` (+50 -0) </details> ### 📄 Description A bunch of our local tests regressed recently. I'm unsure as to when this happened. Clearly, we all do a super good job of running these tests 😄. * I had to make sure the call to `AppLogic::CurrentAppSettings` was try/caught, because that doesn't work in the tests * I had to make the `Pointer*` events take a weak pointer to the `TerminalPage` because for whatever reason, they'd be called at a weird point in the test init, causing the tests to fail. It was weird. Almost as if the TerminalPage had been released, but the test logs showed it hadn't barely been set up yet? Whatever, this fixes it. * The `VerifyCommandPaletteTabSwitcherOrder` test needed to take a time out, for reasons that are not totally clear to me. That one was flakey and I hate it. ### Checklist: * [x] Doesn't close anything, this is just something I noticed. * [x] Doesn't require docs to be updated, it's test fixes * [x] Yea, I ran the tests /cc @Don-Vito: The `FilteredCommandTests` all crashed immediately for me. I'm not sure what's causing that - I _think_ everything we need for those tests is set up right? The generated `AppxManifest.xml` had all the right classes listed in it, I really can't be sure what was wrong there. These tests aren't run in CI so it's not a super big deal, but I thought I'd let you know. (cherry picked from commit ccda434f69d5fd39042d9573f1610aa6ff01d0e7) --- <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:22:03 +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#27451