From 009d8f228c917b2c6fbee6653f15144f3ea19e63 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Wed, 18 Mar 2026 14:44:29 -0500 Subject: [PATCH] Increase FileSystemWatcher test event timeout to 1000ms The inotify refactor (#117148) changed stop/start timing for watches, which can delay event delivery under stress. The 500ms timeout is too tight for jitstress runs on slower hardware (arm32), causing false failures in SymbolicLink tests. Double the timeout from 500ms to 1000ms to better distinguish timing issues from functional bugs. This affects 94 tests that use the default ExpectEvent timeout. Ref: #125737 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../tests/Utility/FileSystemWatcherTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs b/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs index aea89419c6b5c1..c4dca309f24231 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs @@ -21,7 +21,7 @@ public abstract partial class FileSystemWatcherTest : FileCleanupTestBase // going to fail the test. If we don't expect an event to occur, then we need // to keep the timeout short, as in a successful run we'll end up waiting for // the entire timeout specified. - public const int WaitForExpectedEventTimeout = 500; // ms to wait for an event to happen + public const int WaitForExpectedEventTimeout = 1000; // ms to wait for an event to happen public const int LongWaitTimeout = 50000; // ms to wait for an event that takes a longer time than the average operation public const int SubsequentExpectedWait = 10; // ms to wait for checks that occur after the first. public const int WaitForExpectedEventTimeout_NoRetry = 3000;// ms to wait for an event that isn't surrounded by a retry.