mirror of
https://github.com/libuv/libuv
synced 2025-03-28 21:13:16 +00:00
darwin,test: update loop time after sleeping
Otherwise we run the risk of running the timer before the fsevent callback since the timer due time is "now" because it's as long as the process already slept. Refs: https://github.com/libuv/libuv/issues/2491 PR-URL: https://github.com/libuv/libuv/pull/2516 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
39a801d66d
commit
1df44df057
@ -638,6 +638,7 @@ TEST_IMPL(fs_event_watch_file_exact_path) {
|
||||
* versions. Give a long delay here to let the system settle before running
|
||||
* the test. */
|
||||
uv_sleep(1100);
|
||||
uv_update_time(loop);
|
||||
#endif
|
||||
|
||||
r = uv_fs_event_init(loop, &fs_event);
|
||||
@ -703,6 +704,7 @@ TEST_IMPL(fs_event_watch_file_current_dir) {
|
||||
* create_file events prior to macOS 10.11.6 in the subsequent fs_event_start
|
||||
* So let the system settle before running the test. */
|
||||
uv_sleep(1100);
|
||||
uv_update_time(loop);
|
||||
#endif
|
||||
|
||||
r = uv_fs_event_init(loop, &fs_event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user