diff options
author | Stephen Toub <stoub@microsoft.com> | 2016-10-05 21:31:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-05 21:31:55 +0300 |
commit | 984a3748cb478c4eec044c4e316da91d09cc1737 (patch) | |
tree | a3af8a21d0cc15549e03b1a1c0b7891b26c2b0e2 | |
parent | 795777aa8b094026dc31505bd2ef98812619a88e (diff) | |
parent | 2dab1441d118a81cda174a18b884aa3e1c627cd2 (diff) |
Merge pull request #11721 from ianhays/fsw_maxuserinstances
Remove CreateManyConcurrent test
-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")); |