microsoft / microsoft/terminal

TestMouseWheelReadConsoleInputHelper tests are flaky

Open
#4,494 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-CodeHealth Area-Input Help Wanted Issue-Task Product-Conhost
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

In the InputTests, there are a handful of them that inject mouse events into the window handle.

They center around the method TestMouseWheelReadConsoleInputHelper.

They tend to fail when there are two input events in the queue instead of just the one they expect.

My theory is that the extra event in the queue is a focus or unfocus event.

We should make them all more robust to the point where they don't care/skip excess focus/unfocus events.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the InputTests implementation and the TestMouseWheelReadConsoleInputHelper tests first. Run the affected tests to reproduce failures involving extra queued input events, then inspect how focus and unfocus events are handled. Done means the relevant tests tolerate excess focus or unfocus events without becoming flaky.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.