-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A bunch of test fixes #9192
A bunch of test fixes #9192
Conversation
@zadjii-msft - I will try to take a look. I didn't run them for a while as well. Is there any plan to fix the CI to run all tests? |
Yes, but IIRC there was some infrastructure reason as to why the LocalTests still couldn't run in the actual CI. Maybe it was just the pipeline took too long to run on every PR? I think that's what I'm getting from reading #6992. So I think there's a rolling build that does run the LocalTests, but it's not per-PR. It actually looks like the rolling builds are broken too: https://dev.azure.com/ms/terminal/_build/results?buildId=139468&view=logs&j=20c53c45-6f0c-50af-9c69-e93710d9ccb1&t=10a580e5-4c97-5b69-8e02-8d961e3cb079
/cc @miniksa |
That was the reason. At the time, we were using build agents that were unable to run the sorts of packaged activations that we needed, so they had to go to a different pool of agents for testing. And that mechanism was substantially slower than the rest of the CI, so it was moved to rolling-build only.
FFFFFFFFFF. I'll look. |
// sleep here, then it's very possible that the checks below to sanity | ||
// check the titles _will fail_. | ||
Log::Comment(L"Sleep to let events propagate"); | ||
Sleep(500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of a sleep which could vary in length, can we make an event or mutex or something above... dispatch it on a TestOnUIThread
element after all the other tests in a lambda that does nothing but set/trigger it, and then wait here on it until it's triggered as the last queued packet on the UI thread? That would likely assure that the other events have propagated in a more reliable manner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to do that. Unfortunately, the event I'm waiting for here is "let XAML do it's thing". I'm not really sure there's a specific event I can wait for in this case 😕
term.HidePointerCursor({ get_weak(), &TerminalPage::_HidePointerCursorHandler }); | ||
term.RestorePointerCursor({ get_weak(), &TerminalPage::_RestorePointerCursorHandler }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate that this is a workaround for test stuff being weird. The TerminalPage never goes away in common use, so we waste some cycles on every interaction to lock the weak ref.
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@zadjii-msft - I found the reason for FilteredCommand test failures: RPC_E_WRONG_THREAD 🤦 Committing. |
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 😄.
AppLogic::CurrentAppSettings
wastry/caught, because that doesn't work in the tests
Pointer*
events take a weak pointer to theTerminalPage
because for whatever reason, they'd be called at aweird 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.
VerifyCommandPaletteTabSwitcherOrder
test needed to take a timeout, for reasons that are not totally clear to me. That one was flakey
and I hate it.
Checklist:
/cc @Don-Vito: The
FilteredCommandTests
all crashed immediately forme. 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 allthe 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 ccda434)