-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PollingFileWatcher.ready for files that don't exist (dart-lang/wa…
…tcher#157) There were a few issues here: - FileWatcher.ready never fired for files that don't exist because of logic inside FileWatcher existing early if the modification time was `null` - The test I recently added trying to catch this was incorrectly passing because the mock timestamp code was set so that files that had not been created would return a 0-mtime whereas in the real implementation they return `null` So this change a) updates the mock to return `null` for uncreated files (to match the real implementation) which breaks a bunch of tests b) fixes those tests by updating FileWatcher._poll() to handle `null` mtime separately from being the first poll.
- Loading branch information
Showing
4 changed files
with
46 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters