Skip to content
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

[web:flake] pointer_binding_test.dart: ClickDebouncer Dedupes click if pointer down/up flushed recently #139334

Closed
yjbanov opened this issue Nov 30, 2023 · 4 comments
Assignees
Labels
c: flake Tests that sometimes, but not always, incorrectly pass P1 High-priority issues at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team

Comments

@yjbanov
Copy link
Contributor

yjbanov commented Nov 30, 2023

This test is infrequently flaky (not enough for the bots to notice).

00:12 +242 ~1 -1: pointer_binding_test.dart: ClickDebouncer Dedupes click if pointer down/up flushed recently [E]                                                                                      
  Expected: [
              PointerChange:PointerChange.add,
              PointerChange:PointerChange.down,
              PointerChange:PointerChange.up
            ]
    Actual: []
     Which: at location [0] is [] which shorter than expected
  Queued up events should be flushed to the framework because the time expired before the click event arrived.
  
  org-dartlang-sdk:///lib/_internal/js_runtime/lib/js_helper.dart 1196:37                      Object.wrapException
  org-dartlang-sdk:///lib/_internal/js_runtime/lib/js_helper.dart 1236:28                      Object.throwExpression
  home\chrome-bot\.pub-cache\hosted\pub.dev\matcher-0.12.16\lib\src\expect\expect.dart 149:31  Object.fail
  home\chrome-bot\.pub-cache\hosted\pub.dev\matcher-0.12.16\lib\src\expect\expect.dart 144:3   Object._expect
  home\chrome-bot\.pub-cache\hosted\pub.dev\matcher-0.12.16\lib\src\expect\expect.dart 56:3    Object.expect
  ..\..\..\..\flutter\lib\web_ui\test\engine\pointer_binding_test.dart 2942:5                  <fn>
  org-dartlang-sdk:///lib/_internal/js_runtime/lib/async_patch.dart 303:19                     _wrapJsFunctionForAsync.closure.$protected
  org-dartlang-sdk:///lib/_internal/js_runtime/lib/async_patch.dart 328:23                     _wrapJsFunctionForAsync.<fn>
  org-dartlang-sdk:///lib/_internal/js_runtime/lib/async_patch.dart 279:19                     _awaitOnObject.<fn>
  org-dartlang-sdk:///lib/async/zone.dart 1407:39                                              StaticClosure._rootRunUnary
  

To run this test again: C:\b\s\w\ir\cache\builder\src\flutter\prebuilts\windows-x64\dart-sdk\bin\dart test pointer_binding_test.dart -p chrome --plain-name "ClickDebouncer Dedupes click if pointer down/up flushed recently"

I imagine the fix should not be difficult. Some DOM events do not provide timing guarantees and the test is probably prone to races.

Sample log

@yjbanov yjbanov added platform-web Web applications specifically P1 High-priority issues at the top of the work list c: flake Tests that sometimes, but not always, incorrectly pass team-web Owned by Web platform team triaged-web Triaged by Web platform team labels Nov 30, 2023
@yjbanov yjbanov self-assigned this Nov 30, 2023
@yjbanov
Copy link
Contributor Author

yjbanov commented Nov 30, 2023

I'll "lick this cookie" because this is my code and I'm starting to develop a weird fondness of debugging flaky tests.

@zanderso
Copy link
Member

zanderso commented Jan 5, 2024

I'm sheriffing this week, and seeing this flake a lot in both pre- and post- submit. Here's an example that caused a Skia -> Engine roll to fail: flutter/engine#49557. I think it would make sense to increase the priority of this or disable the test until it is de-flaked.

@yjbanov
Copy link
Contributor Author

yjbanov commented Mar 26, 2024

Ok, this test has been disabled on Windows. It seems the ordering of scroll events is different (and flaky) on Windows compared to other platforms.

@yjbanov yjbanov closed this as completed Mar 26, 2024
Copy link

github-actions bot commented Apr 9, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: flake Tests that sometimes, but not always, incorrectly pass P1 High-priority issues at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team
Projects
None yet
Development

No branches or pull requests

2 participants