[PR #7333] Fix broken localtests #26900

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

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

State: closed
Merged: Yes


We've had a number of ignored test failures for a while now. They're all
in the localtests, which we don't run in CI, so we've been ignoring
them. Plus, I thought that they were due to some test failure in the way
they were authored, so we just let them be.

Turns out, most of them worked just fine. Many were probably just
temporary test failures that got fixed with subsequent PRs.

The only one that's truly tricky here is the TryCreateTab test
removal. From what I can tell, that test would create a Tab, but not
attach the TabViewItem to the XAML tree at all. But then after the
test was cleaned up, the tab's _UpdateTitle coroutine would resume,
and it would try to get the Tab from the weak_this. That weak
pointer would now be pointing at random memory, and the get_strong
would crash. However, the test runner would already be in the middle
of some other test, so it would cause a failure in a random test, not
the TryCreateTab test.

So I'm just getting rid of it entirely. The TryInitializePage test is
more comprehensive and does work, so we'll just use that (and
derivatives) to test the creation of tabs.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/7333 **State:** closed **Merged:** Yes --- We've had a number of ignored test failures for a while now. They're all in the localtests, which we don't run in CI, so we've been ignoring them. Plus, I thought that they were due to some test failure in the way they were authored, so we just let them be. Turns out, most of them worked just fine. Many were probably just temporary test failures that got fixed with subsequent PRs. The only one that's truly tricky here is the `TryCreateTab` test removal. From what I can tell, that test would create a `Tab`, but not attach the `TabViewItem` to the XAML tree at all. But then after the test was cleaned up, the tab's `_UpdateTitle` coroutine would resume, and it would try to get the `Tab` from the `weak_this`. That weak pointer would now be pointing at _random_ memory, and the `get_strong` would _crash_. However, the test runner would already be in the middle of some other test, so it would cause a failure in a _random_ test, not the `TryCreateTab` test. So I'm just getting rid of it entirely. The `TryInitializePage` test is more comprehensive and _does_ work, so we'll just use that (and derivatives) to test the creation of tabs. * [x] Closes #5169 * [x] Closes #6949 * [x] Closes #7281 * [ ] Might conflict with #6992
claunia added the pull-request label 2026-01-31 09:18:48 +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#26900