Commit Graph
19 Commits
Author SHA1 Message Date
Justin Van Patten aa68f5ce2f Replace uses of Xunit.PlatformID with renamed TestPlatforms
Replace uses of `Xunit.PlatformID` with renamed `TestPlatforms` because
the old name conflicts with `System.PlatformID` and should be plural
according to the design guidelines for flags enums.


Commit migrated from https://github.com/dotnet/corefx/commit/5179dda7331b1e201519adf76ce9ae69ffe2a0f6
2016-10-01 17:18:41 -07:00
Ian Hays f8f269ff93 Expose InternalBufferOverflowException in FSW (dotnet/corefx#11785)
* Expose InternalBufferOverflowException in FSW
Updates the default targetgroup of filesystemwatcher to netstandard1.7 and exposes InternalBufferOverflowException out of System.IO.FileSystemWatcher.

Commit migrated from https://github.com/dotnet/corefx/commit/148e7d9c6f52f4639226753b0656188e72878c2b
2016-09-30 10:31:41 -04:00
Eric Eilebrecht f877780ab0 Re-enable tests for System.IO.FileSystem.Watcher and System.Net.Ping, on Windows Subsystem for Linux.
These tests now pass, as of Windows 10 preview build 14926.


Commit migrated from https://github.com/dotnet/corefx/commit/947fc61f03b42f88ab2c7ed6de0513c86546f96a
2016-09-14 14:38:38 -07:00
Ian Hays 2cfb99941a Add Outerloop messages and cleanup FSW tests
Commit migrated from https://github.com/dotnet/corefx/commit/f9f626d63eb7de1fc41d68c5e1602f86e86014d1
2016-09-13 10:38:38 -07:00
Eric Eilebrecht be96f805d0 Work around known issues in "Ubuntu on Windows" (dotnet/corefx#11574)
The latest Windows 10 preview builds contain enough functionality in Ubuntu/Bash on Windows (a.k.a. Windows Subsystem for Linux, or WSL) that .NET Core mostly works now. With the fix for dotnet/corefx#11058, we can even build/test the CoreFx tree in this environment. Currently there are a few test failures; I've been working on identifying the causes of these, and filing bugs in the appropriate repos. 
This change implements workarounds for all of the current known issues in the "inner loop" tests. Mostly, I've just conditionally disabled tests when running in the WSL environment. 
There is still an issue, under investigation, causing non-deterministic failures in the System.Net.Http tests (Microsoft/BashOnWindowsdotnet/corefx#1068). And I haven't tried OuterLoop runs of anything but the networking tests. 

Commit migrated from https://github.com/dotnet/corefx/commit/d9aa92f6616d851256339318aadb89a6737e6d13
2016-09-09 20:10:01 -07:00
Ian Hays a30acca4b1 Move some flaky FSW tests to Outerloop
All of the FSW tests are potentially subject to intermittent failures because of the inherint flakiness of the underlying OS file system watching APIs. Although we do some manual stuff to get around that flakiness (e.g. retries, long timeouts), some scenarios aren't reliable enough to make it through. This commit moves those to Outerloop so they don't get in the way of our gated check in tests.


Commit migrated from https://github.com/dotnet/corefx/commit/c827a452b599d67fe68773b96b4da75044452446
2016-09-01 14:28:30 -07:00
Ian Hays febb25693e FileSystemWatcher test overhaul
Reworks the FSW tests to be 100% passing.
- Adds path validation to most tests.
- Adds a Retry mechanism to handle expected intermittent failures due to untrustworthy underlying API calls.
- Adds more test cases to NotifyFilter and splits existing tests into separate dir/file tests to cover either behavior.
- Enable test parallelization


Commit migrated from https://github.com/dotnet/corefx/commit/28d10fa256f40c3d37a8cb82d96a1e5520df03d2
2016-05-09 11:24:59 -07:00
Ian Hays c0f649508b Modify FileSysemWatcher tests to use temp paths.
- Add Common TempDirectory class for short-term temporary directories that are easy to create and destroy
- Put all FSW tests into the System.IO.Tests namespace
- Modify all FSW tests to use the common TempFile/TempDirectory classes instead of their own custom one
- Modify all FSW tests to watch for events in a temporary directory. There shouldn't be any more new items being created or watched in the runtime folder.
- Fix the SymLink tests to use the ConditionalFact attribute similar to how the FileSystem tests function.
- Remove the unnecessary symlink print statements being outputted by the FileSystem CreateSymbolicLink function.


Commit migrated from https://github.com/dotnet/corefx/commit/65356f9471850b796d01f63536c3ba36e504f8e1
2016-04-22 09:14:49 -07:00
Jonathan Miller 91148f73dd Fixing bug dotnet/corefx#7680 where the FullPath property on the OS X
FileSystemWatcher  was incorrect


Commit migrated from https://github.com/dotnet/corefx/commit/72642adf93a2c7c8280195566295f24fab51987b
2016-04-13 16:58:20 -07:00
Jonathan Miller 074ce18ce4 Fixing bug dotnet/corefx#6675 which prevented the OSX FSW from watching
aliased or symlinked folders.


Commit migrated from https://github.com/dotnet/corefx/commit/3f96a35fb43f83805d6ce611c1bd10c8ae0cd9dd
2016-03-10 17:22:10 -08:00
dotnet-bot 39d1eab950 Update licensing headers
Commit migrated from https://github.com/dotnet/corefx/commit/7cad8486cbabbce0236bdf530e30db7036335524
2016-01-27 08:02:28 -08:00
Jonathan Miller 4306181d9b Refactoring the OS X FileSystemWatcher to more match the Linux implementation
by using an internal Instance class in order to allow each instance to clean
itself up without causing side effects to other instances during rapid
start-stop-start scenarios. This refactor fixes issue dotnet/corefx#4738

Fixing a couple broken UTs by preventing notifications from being sent out for
the watched folder. This fixes dotnet/corefx#4830, dotnet/corefx#4831, and parts of dotnet/corefx#2279


Commit migrated from https://github.com/dotnet/corefx/commit/be314721b0f787a18366d8e01ca677db9219e716
2015-12-04 11:03:18 -08:00
Peter Jas a29604278c code: Fixes occurred spelling.
Fixes dotnet/corefx#3661.


Commit migrated from https://github.com/dotnet/corefx/commit/544a3885ff51e04db89b70e3f155be1a5c64f166
2015-10-06 15:27:09 +00:00
stephentoub df23122fde Fix case sensitivity in FSW Path and Filter tests
Changing to use PathInternal.IsCaseSensitive actually fixed a bug in
FSW.Path/Filter.  The tests were testing for the wrong thing on Linux.
This just fixes the tests.


Commit migrated from https://github.com/dotnet/corefx/commit/b24780dd017f9a6a86fd55531fd9410cab6eef8e
2015-09-22 20:16:17 -04:00
stephentoub 2dd748811e Address various issues in FileSystemWatcher
- On Linux, FileSystemWatcher is built on top of inotify, which has various limits configured in the system for how many instances and watches can be created.  When these limits are hit, exceptions are generated, but the Linux-provided error messages are cryptic about what the problem is.  This change adds better error messages for those cases.  It also ensures that errors regarding watch limits always come out of OnError rather than sometimes being thrown synchronously from EnableRaisingEvents and other times coming out asynchronously.
- As part of fixing that, I noticed that we had some reliability issues around marking the instance as enabled.  I fixed this up to ensure that we only mark the instance as enabled when we've created everything we need to successfully launch it.
- While doing that, I noticed that on OS X, if we restart an FSW, we were unnecessarily re-creating a delegate.  I changed it to avoid the unnecessary allocation.
- And while doing that, I also noticed that we we had a bad exception message when constructing an FSW with something other than a directory.  I fixed the error message.
- I added tests for all these things.


Commit migrated from https://github.com/dotnet/corefx/commit/57cf111281a22feafb83854789680680da3cab50
2015-09-02 16:51:12 -04:00
stephentoub 8ce1a4b748 Allow FSW tests to be parallelized
The FSW tests still take ~10 seconds on my machine, most of which is spent waiting for events to not fire.  This change just separates the tests out so that they're not all on the same class, letting xunit parallelize them.  They now take ~3.5 seconds on my machine.


Commit migrated from https://github.com/dotnet/corefx/commit/2fbabe417accb662a6ed63a40506dea0268cf8e2
2015-08-07 14:17:04 -04:00
Stephen Toub 687d8f5c53 Use DirectorySeparatorChar in a FileSystemWatcher test
Commit migrated from https://github.com/dotnet/corefx/commit/3e41e9b55cd8aaba307f4ea5b419f954d3db58f2
2015-03-24 22:32:52 -07:00
Stephen Toub 6b9fef7a91 Fix FileSystemWatcher src/tests on Linux
This commit fixes issues highlighted when running the System.IO.FileSystem.Watcher tests on Linux.  There are 49 tests that pass on Windows; after these product and test fixes, only 7 of those fail on Linux, all due to Windows-specific tests that will need to be tweaked based on target system or disabled entirely on Linux:
- 2 are P/Invoking to Win32 functions related to security
- 3 are trying to overflow the event buffer but not doing so on Linux
- 2 are expecting case-insensitive file paths


Commit migrated from https://github.com/dotnet/corefx/commit/7176a0dc531a1a9c9032c36330bbf92e7ca57f65
2015-03-23 17:54:49 -07:00
dotnet-bot 254a638e63 Add System.IO.FileSystem.Watcher Source and Tests
Commit migrated from https://github.com/dotnet/corefx/commit/73ab96765fa59e5a1d224ecf804a29379da30c0b
2015-03-09 11:50:41 -07:00