Deflake wildcard asset test#42597
Conversation
Codecov Report
@@ Coverage Diff @@
## master #42597 +/- ##
==========================================
- Coverage 59.94% 59.94% -0.01%
==========================================
Files 194 194
Lines 18871 18873 +2
==========================================
Hits 11313 11313
- Misses 7558 7560 +2
Continue to review full report at Codecov.
|
dnfield
left a comment
There was a problem hiding this comment.
This should deflake the test but this seems like the implementation could end up going wrong
How much more expensive would it be to hash the files?
|
For the flutter gallery it takes about half a second. For an application with larger assets or on a slower compute it takes significantly longer. Keep in mind we would need to hash every single asset file on hot reloads and hot restarts. The consequences of getting this wrong during development are pretty mild, just hot restart again. For building applications we use the file hashes instead of timestamps The trade-off isn't really worth it. |
Description
For wildcard assets, filestat the individual contents instead of the directory. Deflake the test by manually setting the lastModifiedSync to the future.
Fixes #42230
Fixes #34446