Flaky test: ComboBoxIntegrationTests::CanCycleThroughItemsWithMouseWheel
Author: JesseColCreated Aug 18, 2026Updated Sep 18, 2026
Labelsbugarea-TestInfrastructurearea-ComboBoxteam-Controls
Summary
ComboBoxIntegrationTests::CanCycleThroughItemsWithMouseWheel is flaky because synthetic mouse-wheel input intermittently does not update SelectedIndex. The failure can block PR and nightly validation.
Test
Source: ComboBoxIntegrationTests.cpp
The test focuses a ComboBox and expects three mouse-wheel inputs to move selection:
-1to00to11to0
Observed failures
AreEqual(expected, selector->SelectedIndex) - Values (0, -1)
AreEqual(expected, selector->SelectedIndex) - Values (1, 0)The assertions are reported from dxaml/test/native/external/controls/inc/SelectorHelper.h, line 21. In a recent run, the failure reproduced on two machines:
- 8 of 11 in-job attempts failed on one machine.
- 7 of 11 in-job attempts failed on another machine.
Historical PR-pipeline results also show failures during the preceding 30 days.
Expected behavior
Each injected wheel input should be observed, and the test should pass reliably under repeated execution on every configuration where it is enabled.
Notes
- A
SetForegroundWindowwarning sometimes accompanies the failure, but the failing condition is the unchanged selection. - The test directly adds
ComboBoxIteminstances. It does not set anItemTemplateor callDataTemplate.LoadContent(). - Targeted validation that forced
DataTemplate::LoadContentImpl()to fail did not affect this test. A prior timing correlation with an unrelated DataTemplate change therefore does not establish causation.
Completion criteria
- Identify why mouse-wheel input is intermittently dropped or not observed.
- Make the test deterministic without weakening its three selection-transition checks.
- Confirm sustained passes under repeated execution on the affected configurations.
Source: microsoft/microsoft-ui-xaml