-
Notifications
You must be signed in to change notification settings - Fork 71
Add test coverage around startup race and missing file on startup. #2174
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds valuable test coverage for a startup race condition and for watching non-existent files. The refactoring of shared tests and the addition of the expectNoEvents
helper are good improvements. However, I've identified a couple of critical issues in the new tests. The test for the startup race condition is not functioning as intended due to misuse of global test helpers, and another test has an incorrect expect
call. Addressing these issues will make this a strong contribution to the test suite's reliability.
PR HealthBreaking changes ✔️
This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with Coverage ✔️
This check for test coverage is informational (issues shown here will not fail the PR). This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
This check can be disabled by tagging the PR with |
ffb8cd0
to
d92dd12
Compare
Whoops, some of the new tests were not actually wired up to run--because I copied them from the PR where I originally wrote them. I will fix and resend for review :) |
14e126d
to
d28c2f9
Compare
d28c2f9
to
cfeaef4
Compare
Okay, this looks good now. The test failures are unrelated, pre-existing flakiness: they're on directory_watcher, this PR is just on file_watcher. |
For #2170, start adding test coverage.
I initially started adding test coverage around symlinks, but encountered two existing issues that made it awkward
Cover both of these with tests before making any changes :)
Add
expectNoEvents
and use it in one existing test as it's more readable than triggering then waiting for a different event.