diff options
author | Ian Hays <ianha@microsoft.com> | 2016-10-04 18:36:30 +0300 |
---|---|---|
committer | Ian Hays <ianha@microsoft.com> | 2016-10-04 18:36:30 +0300 |
commit | 2dab1441d118a81cda174a18b884aa3e1c627cd2 (patch) | |
tree | 6a908031a4c5bbaeab68f5b921b7a4577144ea48 | |
parent | d04ba13bfefb7faae65c1078c4e25cdaa3f809da (diff) |
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.
-rw-r--r-- | src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs index c59e281536..dd569210a7 100644 --- a/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs +++ b/src/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.unit.cs @@ -545,37 +545,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<FileSystemWatcher>(); - - using (var dir = new TempDirectory(GetTestFilePath())) - { - try - { - Assert.Throws<IOException>(() => - { - // 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")] public void FileSystemWatcher_CreateManyConcurrentWatches() { int maxUserWatches = int.Parse(File.ReadAllText("/proc/sys/fs/inotify/max_user_watches")); |