From 180cadd44997941f7eacab57fd1efb2de27a753c Mon Sep 17 00:00:00 2001 From: Ian Hays Date: Tue, 4 Oct 2016 08:36:30 -0700 Subject: [PATCH] Remove the CreateManyConcurrent test The test is causing intermittent failures in other tests and is also intermittently failing itself. Without modifying system resources we can't make this test trustworthy, so it's better to remove it for the sake of stability. Commit migrated from https://github.com/dotnet/corefx/commit/2dab1441d118a81cda174a18b884aa3e1c627cd2 --- .../tests/FileSystemWatcher.unit.cs | 31 ------------------- 1 file changed, 31 deletions(-) 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")]