Skip to content

Commit

Permalink
test: Drop mobile pixel tests in TestHistoryMetrics.testEvents
Browse files Browse the repository at this point in the history
The mobile pixel test is way too flaky (> 50% failure rate on our CI).
scrollIntoViewIfNeeded() somehow misplaces the menu bar. This isn't a
real problem, an interactive Firefox/Chromium works fine.

Nobody has figured this out in two weeks, earlier attempts at fixing
that (commits e700960 and 790b377) also weren't effective. Figuring this
out is too much effort for too little benefit, and this flake breaks
pretty much every PR. So disable the mobile pixel test.

Fixes cockpit-project#20338
  • Loading branch information
martinpitt committed May 3, 2024
1 parent 6a22cba commit 2e072c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions test/verify/check-metrics
Expand Up @@ -238,16 +238,17 @@ class TestHistoryMetrics(testlib.MachineCase):
b.wait_in_text("#metrics-hour-1597662000000:not(.metrics-hour-compressed) .metrics-events-hour-header-expanded .spikes_count", "3 spikes")
b.wait_in_text("#metrics-hour-1597662000000:not(.metrics-hour-compressed) .metrics-events-hour-header-expanded .spikes_info", "1 Memory, 1 Disk I/O, 1 Network I/O")

# FIXME: mobile layout is racy in tests (only, not in reality), scrollIntoView() misplaces the menu bar
b.assert_pixels(".metrics", "metrics-history-expanded-hour", ignore=[".spikes_count"],
wait_after_layout_change=True)
skip_layouts=["mobile"], wait_after_layout_change=True)

b.click("#metrics-hour-1597662000000 button.metrics-events-expander")
b.wait_in_text("#metrics-hour-1597662000000.metrics-hour-compressed", "1:00")
b.wait_in_text("#metrics-hour-1597662000000.metrics-hour-compressed .spikes_count", "3 spikes")
b.wait_in_text("#metrics-hour-1597662000000.metrics-hour-compressed .spikes_info", "1 Memory, 1 Disk I/O, 1 Network I/O")

b.assert_pixels(".metrics", "metrics-history-compressed-hour", ignore=[".nodata"],
wait_after_layout_change=True)
skip_layouts=["mobile"], wait_after_layout_change=True)

# Check that events are not visible for compressed hours
b.wait_not_present("#metrics-hour-1597662000000 div.metrics-minute[data-minute='28'] .metrics-events")
Expand Down

0 comments on commit 2e072c6

Please sign in to comment.