diff --git a/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs b/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs index c59e2815363..dd569210a7c 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs @@ -542,37 +542,6 @@ namespace System.IO.Tests } } - [Fact] - [PlatformSpecific(TestPlatforms.Linux)] - [OuterLoop("This test has high system resource demands and may cause failures in other concurrent tests")] - public void FileSystemWatcher_CreateManyConcurrentInstances() - { - int maxUserInstances = int.Parse(File.ReadAllText("/proc/sys/fs/inotify/max_user_instances")); - var watchers = new List(); - - using (var dir = new TempDirectory(GetTestFilePath())) - { - try - { - Assert.Throws(() => - { - // Create enough inotify instances to exceed the number of allowed watches - for (int i = 0; i <= maxUserInstances; i++) - { - watchers.Add(new FileSystemWatcher(dir.Path) { EnableRaisingEvents = true }); - } - }); - } - finally - { - foreach (FileSystemWatcher watcher in watchers) - { - watcher.Dispose(); - } - } - } - } - [Fact] [PlatformSpecific(TestPlatforms.Linux)] [OuterLoop("This test has high system resource demands and may cause failures in other concurrent tests")]