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

IOException: directory already exists in Ubuntu #195

Closed
madelson opened this issue Mar 17, 2024 · 0 comments
Closed

IOException: directory already exists in Ubuntu #195

madelson opened this issue Mar 17, 2024 · 0 comments

Comments

@madelson
Copy link
Owner

From https://ci.appveyor.com/project/madelson/distributedlock/build/job/vww7q8txqj37tj4q

Failed TestDoesNotFailDueToUnauthorizedAccessExceptionOnDirectoryCreation [32 ms]
  Error Message:
     Expected: No Exception to be thrown
  But was:  <System.InvalidOperationException: Failed to ensure that lock file directory /tmp/FileDistributedLockTest/net8.0 exists
 ---> System.IO.IOException: The file '/tmp/FileDistributedLockTest/net8.0' already exists.
   at Medallion.Threading.FileSystem.FileDistributedLock.EnsureDirectoryExists() in /_/src/DistributedLock.FileSystem/FileDistributedLock.cs:line 142
   --- End of inner exception stack trace ---
   at Medallion.Threading.FileSystem.FileDistributedLock.EnsureDirectoryExists() in /_/src/DistributedLock.FileSystem/FileDistributedLock.cs:line 150
   at Medallion.Threading.FileSystem.FileDistributedLock.TryAcquire(CancellationToken cancellationToken) in /_/src/DistributedLock.FileSystem/FileDistributedLock.cs:line 74
   at Medallion.Threading.Internal.BusyWaitHelper.WaitAsync[TState,TResult](TState state, Func`3 tryGetValue, TimeoutValue timeout, TimeoutValue minSleepTime, TimeoutValue maxSleepTime, CancellationToken cancellationToken) in /_/src/DistributedLock.Core/Internal/BusyWaitHelper.cs:line 22
   at Medallion.Threading.Internal.SyncViaAsync.Run[TState,TResult](Func`2 action, TState state) in /_/src/DistributedLock.Core/Internal/SyncViaAsync.cs:line 61
   at Medallion.Threading.Internal.DistributedLockHelpers.TryAcquire[THandle](IInternalDistributedLock`1 lock, TimeSpan timeout, CancellationToken cancellationToken) in /_/src/DistributedLock.Core/Internal/DistributedLockHelpers.cs:line 56
   at Medallion.Threading.FileSystem.FileDistributedLock.TryAcquire(TimeSpan timeout, CancellationToken cancellationToken) in /_/src/DistributedLock.FileSystem/FileDistributedLock.IDistributedLock.cs:line 32
   at Medallion.Threading.Tests.FileSystem.FileDistributedLockTest.<>c__DisplayClass19_1.<TestDoesNotFailDueToUnauthorizedAccessExceptionOnDirectoryCreation>b__2() in /home/appveyor/projects/distributedlock/src/DistributedLock.Tests/Tests/FileSystem/FileDistributedLockTest.cs:line 446
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at NUnit.Framework.Internal.TaskAwaitAdapter.NonGenericAdapter.BlockUntilCompleted()
   at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaitable)
   at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
   at NUnit.Framework.Internal.ExceptionHelper.RecordException(Delegate parameterlessDelegate, String parameterName)>
  Stack Trace:
     at Medallion.Threading.Tests.FileSystem.FileDistributedLockTest.TestDoesNotFailDueToUnauthorizedAccessExceptionOnDirectoryCreation() in /home/appveyor/projects/distributedlock/src/DistributedLock.Tests/Tests/FileSystem/FileDistributedLockTest.cs:line 457
@madelson madelson added this to the 2.4 milestone Mar 17, 2024
@madelson madelson added the bug label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant