Skip to content

Commit

Permalink
test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Jan 5, 2024
1 parent aaa405b commit 1ba4a4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/Foundatio.TestHarness/Storage/FileStorageTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,12 @@ public virtual async Task WillWriteStreamContentAsync()

using (storage)
{

using (var writer = new StreamWriter(await storage.GetFileStreamAsync(path, StreamMode.Write), Encoding.UTF8, 1024, false))
await using (var writer = new StreamWriter(await storage.GetFileStreamAsync(path, StreamMode.Write), Encoding.UTF8, 1024, false))
{
await writer.WriteAsync(testContent);
}

var content = await storage.GetFileContentsAsync(path);
string content = await storage.GetFileContentsAsync(path);

Assert.Equal(testContent, content);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Foundatio/Storage/FolderFileStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Stream GetFileStreamAsync(string path, FileAccess fileAccess)
throw new ArgumentNullException(nameof(path));

string normalizedPath = path.NormalizePath();
var fullPath = Path.Combine(Folder, normalizedPath);
string fullPath = Path.Combine(Folder, normalizedPath);
if (fileAccess != FileAccess.Read)
{
CreateFileStream(fullPath).Dispose();
Expand Down

0 comments on commit 1ba4a4f

Please sign in to comment.