Skip to content

(test): schedule-disable inode check is flaky on Windows #523

Open

Description

@devsuitup

test/schedule-disable.test.js:120 "setScheduleEnabled: replaces the file rather than writing into it" failed once on windows-2022 / Node 20 (run 37969225318, attempt 1, PR #520 head e3c33f0, a head that touches nothing schedule-related). The attempt-2 rerun passed.

The failure:

Expected "actual" to be strictly unequal to:
23925373022101410

The test compares fs.statSync().ino before and after the write. On Windows the file index is a 64-bit value returned as a double, so it can lose precision, and NTFS can hand the same index to a file that replaces another. Both make inode inequality an unreliable proof of replacement there. This explanation is plausible, not measured.

Expected: a check that proves replacement without relying on ino on win32. For example, hold an open handle or a hard link on the old file and check that its content is unchanged. Or skip only the inode assertion on win32.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions