Wait for Quick Info to render before reading content#52431
Wait for Quick Info to render before reading content#52431sharwell merged 1 commit intodotnet:mainfrom
Conversation
| var session = broker.GetSession(view); | ||
|
|
||
| using var cts = new CancellationTokenSource(Helper.HangMitigatingTimeout); | ||
| while (session.State != QuickInfoSessionState.Visible) |
There was a problem hiding this comment.
Two options on how to do this:
- I think awaiting
TriggerQuickInfoAsync()will ensure that the tooltip is active before returning the session. - Alternatively, if you don't care about the UI being visible, you can call
GetQuickInfoItemsAsync()to just get the content that would be displayed in the tooltip.
There was a problem hiding this comment.
think awaiting
TriggerQuickInfoAsync()will ensure that the tooltip is active before returning the session
We call InvokeQuickInfo before calling GetQuickInfo, and I recently updated the former to await TriggerQuickInfoAsync.
Alternatively, if you don't care about the UI being visible, you can call
GetQuickInfoItemsAsync()to just get the content that would be displayed in the tooltip.
Since this is integration tests, I think we should check the actual content if possible.
There was a problem hiding this comment.
I'm surprised this is necessary, AFAICT we're not doing any fire-and-forget async work. It should all be tracked by the task returned by Trigger.
There was a problem hiding this comment.
That's exactly what I was thinking, but the log is showing test failures even though the content is clearly appearing.
There was a problem hiding this comment.
Exceptions and screenshots can be seen in the artifacts for https://dev.azure.com/dnceng/public/_build/results?buildId=1073724&view=results
There was a problem hiding this comment.
Should we get a dump created at the failure point? It seems like this should be relatively straightforward for @gundermanc or somebody else to debug, right?
There was a problem hiding this comment.
Sure, if you can point me to some sort of diagnostic info I can take a look opportunistically.
There was a problem hiding this comment.
We don't have a dump. Even by the time the screenshot is taken for the test failure exception you can see the expected Quick Info content.
No description provided.