From 29138058a5a51c6e9e187d1109494d29a948d529 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sun, 4 Sep 2016 23:09:23 +0200 Subject: [PATCH] test: fix fs_event_watch_dir flakiness on arm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increase the time between file creations, so all the events are emitted. PR-URL: https://github.com/libuv/libuv/pull/1038 Reviewed-By: Ben Noordhuis Reviewed-By: Saúl Ibarra Corretgé Reviewed-By: Colin Ihrig --- test/test-fs-event.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/test-fs-event.c b/test/test-fs-event.c index 5b7774b6..aa4fcf19 100644 --- a/test/test-fs-event.c +++ b/test/test-fs-event.c @@ -36,6 +36,12 @@ # endif #endif +#if defined(__arm__)/* Increase the timeout so the test passes on arm CI bots */ +# define CREATE_TIMEOUT 100 +#else +# define CREATE_TIMEOUT 1 +#endif + static uv_fs_event_t fs_event; static const char file_prefix[] = "fsevent-"; static const int fs_event_file_count = 16; @@ -152,7 +158,10 @@ static void fs_event_create_files(uv_timer_t* handle) { if (++fs_event_created < fs_event_file_count) { /* Create another file on a different event loop tick. We do it this way * to avoid fs events coalescing into one fs event. */ - ASSERT(0 == uv_timer_start(&timer, fs_event_create_files, 1, 0)); + ASSERT(0 == uv_timer_start(&timer, + fs_event_create_files, + CREATE_TIMEOUT, + 0)); } }