瀏覽代碼

lib/fs: Prolong test timeout on darwin, hopefully fixing flakyness

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4576
Simon Frei 7 年之前
父節點
當前提交
c005b8dcb0
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      lib/fs/basicfs_watch_test.go

+ 5 - 1
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()