From c005b8dcb0724a9b7f4cd337037f2deb5d6e297d Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Wed, 6 Dec 2017 22:07:08 +0000 Subject: [PATCH] lib/fs: Prolong test timeout on darwin, hopefully fixing flakyness GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4576 --- lib/fs/basicfs_watch_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/fs/basicfs_watch_test.go b/lib/fs/basicfs_watch_test.go index 1c23d8cb..a19e914f 100644 --- a/lib/fs/basicfs_watch_test.go +++ b/lib/fs/basicfs_watch_test.go @@ -218,7 +218,11 @@ func testScenario(t *testing.T, name string, testCase func(), expectedEvents []E go testWatchOutput(t, name, eventChan, expectedEvents, allowOthers, ctx, cancel) - timeout := time.NewTimer(2 * time.Second) + timeoutDuration := 2 * time.Second + if runtime.GOOS == "darwin" { + timeoutDuration *= 2 + } + timeout := time.NewTimer(timeoutDuration) testCase()