-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
CI: FileWatching error on macOS #26725
Comments
I think the test is probably just too strict, and needs someone to look into it and decide on the appropriate resolution. |
FWIW, I have seen it on my mac locally a few times too. |
It looks like the issue is that the events we're getting are out-of-order;
|
Interesting. So maybe we could collect them and then check that the set of notifications is correct? |
It seems to me that the design of the tests is very purposeful that the events should come in in-order. My best guess is that OSX may have a "granularity" at which new events come in, and within a bin, events are not guaranteed to be ordered. I know that OSX filesystems have a timestamp granularity of 1s; that doesn't necessarily mean anything here, but it gives me pause. |
If the OS doesn't guarantee ordering of events, then we can expect it in our tests... |
This was an optimistic close. Let's keep a close eye on things here and re-open if we still see trouble. |
Attempt to fix JuliaLang#26725
Just seen again: https://travis-ci.org/JuliaLang/julia/jobs/396739198 |
For what it's worth, OSX was a major pain for Revise, which uses FileWatching heavily. To prevent test failures it now compares if mtime(path) + 1 >= floor(wf.timestamp) # OSX rounds mtime up, see #22 and after creating a new file the tests sleep 2.1 seconds before setting up watching (partly to overcome this slop). After triggering watching on a file, Revise's tests also wait 0.1 seconds before doing anything that depends on watching actually working. (On Linux, you could divide all these numbers by 10 and you'd be fine.) You can search https://github.com/timholy/Revise.jl/blob/master/test/runtests.jl for Also, Revise's tests use this heavily: @static if Sys.isapple()
yry() = (sleep(1.1); revise(); sleep(1.1))
else
yry() = (sleep(0.1); revise(); sleep(0.1))
end |
My understanding is that this is one of the contributing factors in the switch to APFS and that the Revise.jl issue should start to go away in another year or so |
Closing in favour of #28430. |
For example: https://travis-ci.org/JuliaLang/julia/jobs/362508394
The text was updated successfully, but these errors were encountered: