Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Cleanup File Lock/Unlock OSX tests.#16449

Merged
stephentoub merged 2 commits into
dotnet:masterfrom
ianhays:filelock_osx_tests
Feb 26, 2017
Merged

Cleanup File Lock/Unlock OSX tests.#16449
stephentoub merged 2 commits into
dotnet:masterfrom
ianhays:filelock_osx_tests

Conversation

@ianhays
Copy link
Copy Markdown
Contributor

@ianhays ianhays commented Feb 24, 2017

Adds/modifies tests for FileStream lock/unlock after dotnet/coreclr#9769.

@ianhays ianhays added area-System.IO test enhancement Improvements of test source code labels Feb 24, 2017
@ianhays ianhays added this to the 2.0.0 milestone Feb 24, 2017
@ianhays ianhays self-assigned this Feb 24, 2017
using (FileStream fs = File.Open(path, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
{
Assert.Throws<PlatformNotSupportedException>(() => fs.Lock(0, 100));
Assert.Throws<PlatformNotSupportedException>(() => fs.Unlock(0, 100));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to also verify that after these calls the FileShare'ing for the FileStream is still valid, i.e. that we didn't somehow mess up the lock that was already there.

@stephentoub
Copy link
Copy Markdown
Member

Blocked on #16454 being merged

@stephentoub
Copy link
Copy Markdown
Member

@dotnet-bot test this please

@stephentoub stephentoub merged commit 71b1d03 into dotnet:master Feb 26, 2017
@ianhays ianhays deleted the filelock_osx_tests branch April 25, 2017 18:06
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Cleanup File Lock/Unlock OSX tests.

Commit migrated from dotnet/corefx@71b1d03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.IO test enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants