Skip to content

Commit

Permalink
Include async stream dispose in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
btburnett3 committed Dec 15, 2024
1 parent 3dee7b9 commit ced3041
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Snappier.Tests/SnappyStreamTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,19 @@ public async Task CompressAndDecompressAsync(string filename)

using var output = new MemoryStream();

#if NET6_0_OR_GREATER
await
#endif
using (var compressor = new SnappyStream(output, CompressionMode.Compress, true))
{
await resource.CopyToAsync(compressor);
}

output.Position = 0;

#if NET6_0_OR_GREATER
await
#endif
using var decompressor = new SnappyStream(output, CompressionMode.Decompress, true);

using var streamReader = new StreamReader(decompressor, Encoding.UTF8);
Expand Down

0 comments on commit ced3041

Please sign in to comment.