Skip to content

Comments

Possible fix for flaky file watching test#14543

Merged
MichaReiser merged 3 commits intomainfrom
micha/fix-file-watching
Dec 3, 2024
Merged

Possible fix for flaky file watching test#14543
MichaReiser merged 3 commits intomainfrom
micha/fix-file-watching

Conversation

@MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Nov 22, 2024

Summary

Instead of waiting for a maximum duration, wait for a specific change event and fail if it isn't seen in the specified timeout.
This is also not 100% bulletproof because the event order can differ between OS, and listing all seen events is fairly cumbersome. But hopefully, this gets us to something more predictable and the error message contain more useful information

Fixes #14473

Test Plan

cargo test

Let's see if it breaks for windows or unix

@MichaReiser MichaReiser added the ty Multi-file analysis & type inference label Nov 22, 2024
@MichaReiser MichaReiser marked this pull request as draft November 22, 2024 21:29
@MichaReiser MichaReiser force-pushed the micha/fix-file-watching branch from 33e7578 to aeb1d36 Compare November 22, 2024 21:42
@MichaReiser MichaReiser force-pushed the micha/fix-file-watching branch from aeb1d36 to 3e42bfc Compare November 22, 2024 21:50
@github-actions
Copy link
Contributor

github-actions bot commented Nov 22, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser force-pushed the micha/fix-file-watching branch from 3536d87 to 22e341a Compare November 23, 2024 12:28
@MichaReiser MichaReiser marked this pull request as ready for review November 29, 2024 14:18
@MichaReiser MichaReiser added the testing Related to testing Ruff itself label Nov 29, 2024
@MichaReiser MichaReiser merged commit c2e17d0 into main Dec 3, 2024
@MichaReiser MichaReiser deleted the micha/fix-file-watching branch December 3, 2024 07:22
dcreager added a commit that referenced this pull request Dec 3, 2024
* main:
  [`ruff`] Extend unnecessary-regular-expression to non-literal strings (`RUF055`) (#14679)
  Minor followups to RUF052 (#14755)
  [red-knot] Property tests (#14178)
  [red-knot] `is_subtype_of` fix for `KnownInstance` types (#14750)
  Improve docs for flake8-use-pathlib rules (#14741)
  [`ruff`] Implemented `used-dummy-variable` (`RUF052`) (#14611)
  [red-knot] Simplify tuples containing `Never` (#14744)
  Possible fix for flaky file watching test (#14543)
  [`flake8-import-conventions`] Improve syntax check for aliases supplied in configuration for `unconventional-import-alias (ICN001)` (#14745)
  [red-knot] Deeper understanding of `LiteralString` (#14649)
  red-knot: support narrowing for bool(E) (#14668)
  [`refurb`] Handle non-finite decimals in `verbose-decimal-constructor (FURB157)` (#14596)
  [red-knot] Re-enable linter corpus tests (#14736)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Related to testing Ruff itself ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaking test red_knot::file_watching directory_renamed

2 participants