Conversation
|
Actually, that seems to be an issue with the timeout on all platforms. Perhaps I just don't understand how to use it. The test is pretty slow at picking up the change event on macOS though. It takes about a second or so. |
|
I will take a look locally tomorrow morning. As for CI, the main CI in this repo is Travis. It is running here. It hasn't been reporting status for several of my repos lately, ever since some maintenance Travis did about a week ago. |
|
One notable thing about the Travis CI is that it should be much faster than the GH Actions setup in this repo, because of caching. So, you can use it for faster iteration. |
|
The test...
What does this refer to? At least on WSL, the test appears to have finished immediately. I wonder if the issue in the test on macOS is a race condition. What if you insert, say, a 100ms delay before this? You can also sample the current time after the delay, and sample it again in the callback, and check that the delta is less than some small value. |
With
It seems to make no difference on my Macbook. I'll try it out on the CI too, but want to do a run with just the timings first, to get a baseline.
Good idea. I used On my Macbook it fails with a delay between 0.9 and 1.3 seconds, and around 1.2 being typical. |
|
Well, we would've gotten a baseline if it didn't hang on macOS and if it had ran tests on the Github Action VMs, but alas... Let's try the 100ms delay then. |
|
You can run the tests in GH Actions also, just edit this line Line 32 in a2f83d2 to be I had them disabled because of some compatibility issue during the Windows port. I will later go back and see if they work now (if you don't already try it in this PR). |
That's correct. The default behavior of It's also possible some other test is interfering with this test's |
|
If you need to investigate what's happening at the C level, you can directly edit the code of libuv in your recursively cloned submodule. Of course, this is only good for local testing. I've previously inserted The Luv build system should pick up the change, so you can just run the tests again. If not, |
|
Ah yeah, the install line above should also have |
|
Adding a delay with I've tried the same with the test that was failing for us, and the result of running it locally was promising at least. I'm unsure if it's worth pursuing this further, as the conditions that trigger it seem to be pretty artificial. It's definitely useful to know when writing tests, but the workaround is pretty straightforward. I should at least add a comment to this test explaining why it's needed, but it might be an idea to document it elsewhere as well.
Oh, of course. For some reason I thought |
|
Have you tried running the test case in isolation? It's possible that the race condition is in the test suite, and is due to some kind of interaction between lingering handles from different tests.
|
|
I'm not sure how to run a single test in isolation. Other than commenting out the other tests in |
|
Thanks! |
While trying to troubleshoot a test failure in Onivim relating to fs_event I added this change test to Luv's test suite. Our test only fails on macOS, and while this test passes on both Linux and macOS it still times out on macOS only (or runs indefinitely without the timeout).
I'm having issues with other tests hanging on both platforms as well, so I'm wondering if this specific issue happens on the CI or for others tool, or if it's just me doing something wrong.