Skip to content

Commit

Permalink
Fix further issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vbreuss committed Dec 16, 2024
1 parent c398a61 commit 8b915e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Threading.Tasks;
using Testably.Abstractions.Testing.Statistics;
using Testably.Abstractions.Testing.Tests.TestHelpers;
// ReSharper disable MethodSupportsCancellation

namespace Testably.Abstractions.Testing.Tests.Statistics.FileSystem;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
// ReSharper disable MethodSupportsCancellation

namespace Testably.Abstractions.Tests.FileSystem.FileSystemWatcher;

Expand Down Expand Up @@ -50,7 +51,7 @@ void FileSystemWatcherOnChanged(object sender, FileSystemEventArgs e)
while (!token.IsCancellationRequested)
{
string content = i++.ToString(CultureInfo.InvariantCulture);
FileSystem.File.WriteAllText(path, content);
await FileSystem.File.WriteAllTextAsync(path, content, token);
await Task.Delay(10);
ms1.Set();
}
Expand Down Expand Up @@ -261,7 +262,7 @@ void FileSystemWatcherOnRenamed(object sender, FileSystemEventArgs e)
try
{
int i = 0;
FileSystem.File.WriteAllText($"path-{i}", "");
await FileSystem.File.WriteAllTextAsync($"path-{i}", "", token);
while (!token.IsCancellationRequested)
{
FileSystem.File.Move($"path-{i}", $"path-{++i}");
Expand Down

0 comments on commit 8b915e0

Please sign in to comment.