diff --git a/tests/standalone/System/DirectoryWatcher.cpp b/tests/standalone/System/DirectoryWatcher.cpp index bd9d06d..fa07b27 100644 --- a/tests/standalone/System/DirectoryWatcher.cpp +++ b/tests/standalone/System/DirectoryWatcher.cpp @@ -177,6 +177,11 @@ Void::Testing::Test directory_watcher_signals_rescan_on_overflow_and_limit() auto w_res = Void::FileSystem::DirectoryWatcher::create(tmp.path(), tight); Void::Testing::require(w_res.has_value()); +#ifdef _WIN32 + // The Windows backend arms its first read on the watcher thread; let + // it start before making a change that must be observed. + std::this_thread::sleep_for(std::chrono::milliseconds{50}); +#endif Void::Testing::require( Void::FileSystem::ensure_directory(tmp / "extra_dir").has_value()); #ifdef _WIN32