Skip to content

Test flake: office-live-829 "a file change settles into one refresh" fails on a loaded runner #883

Open

Description

@Dkm0315

What happens: tests/office-live-829.test.ts (added in #832), test "a file change settles into one refresh, one at a time, and an unchanged file never refreshes", sometimes fails in CI with "nothing before the debounce after the last change". Seen in run 43736734435 on #881; that PR doesn't touch office previews, and the test passes locally.

Why: after real delay(10) / delay(20) sleeps, the test asserts that no refresh has happened yet. On a loaded runner a sleep can overrun the debounce window, so the refresh fires early.

Expected: drive the debounce with a fake clock (or a debounce injected by the test) so timing can't fail it, and keep the same assertions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions