Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition in Test-Suite or issue with globbing #2203

Closed
matthid opened this issue Nov 15, 2018 · 0 comments
Closed

Race condition in Test-Suite or issue with globbing #2203

matthid opened this issue Nov 15, 2018 · 0 comments
Labels

Comments

@matthid
Copy link
Member

matthid commented Nov 15, 2018

Description

Seen in #2200

Ignored:   0
Failed:    0
Errored:   1
	Fake.Core.Globbing.Tools.Tests/Test find tool folder in sub path <Expecto>
System.IO.DirectoryNotFoundException: Could not find a part of the path '/build/some path'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
   at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at Fake.IO.Globbing.Glob.buildPaths@49-2.Invoke(String dir) in /build/src/app/Fake.IO.FileSystem/Globbing.fs:line 53
   at Microsoft.FSharp.Primitives.Basics.List.collectToFreshConsTail[T,TResult](FSharpFunc`2 f, FSharpList`1 list, FSharpList`1 cons)
   at Microsoft.FSharp.Primitives.Basics.List.collect[T,TResult](FSharpFunc`2 f, FSharpList`1 list)
   at Fake.IO.Globbing.Glob.search(String baseDir, String originalInput) in /build/src/app/Fake.IO.FileSystem/Globbing.fs:line 133
   at <StartupCode$Fake-IO-FileSystem>.$GlobbingFileSystem.System-Collections-Generic-IEnumerable-1-GetEnumerator@39-2.GenerateNext(IEnumerable`1& next) in /build/src/app/Fake.IO.FileSystem/GlobbingFileSystem.fs:line 40
   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl()
   at Microsoft.FSharp.Collections.Internal.IEnumerator.next@187[T](FSharpFunc`2 f, IEnumerator`1 e, FSharpRef`1 started, Unit unitVar0)
   at Microsoft.FSharp.Collections.Internal.IEnumerator.next@187[T](FSharpFunc`2 f, IEnumerator`1 e, FSharpRef`1 started, Unit unitVar0)
   at Microsoft.FSharp.Collections.SeqModule.TryHead[T](IEnumerable`1 source)
   at Fake.IO.Globbing.Tools.tryFindToolFolderInSubPath(String toolname) in /build/src/app/Fake.IO.FileSystem/GlobbingFileSystem.fs:line 246
   at Fake.Core.GlobbingTests.toolsTests@95-2.Invoke(Unit _arg3) in /build/src/test/Fake.Core.UnitTests/Fake.IO.Globbing.fs:line 99
   at Expecto.Impl.execTestAsync@925-1.Invoke(Unit unitVar) in C:\Users\Anthony Lloyd\src\expecto\Expecto\Expecto.fs:line 929
   at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@522.Invoke(AsyncParams`1 args)

I feel like what happens is that one test (the failing one here) is enumerating directories while another parallel running one is deleting this directory.

Question: Should our globbing be able to handle that scenario? If yes we probably want to add a test and fix that scenario by catching the exception.

@matthid matthid added the bug label Nov 15, 2018
@matthid matthid mentioned this issue Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant