fix up tests

This commit is contained in:
Adam Hathcock
2026-01-23 09:04:55 +00:00
parent 7732fbb698
commit 21ce9a38e6
2 changed files with 4 additions and 4 deletions

View File

@@ -259,7 +259,7 @@ public class ZipReaderAsyncTests : ReaderTests
// when FlushAsync() fails on non-seekable streams (Deflate compression)
var path = Path.Combine(TEST_ARCHIVES_PATH, "Zip.deflate.dd.zip");
using Stream stream = new ForwardOnlyStream(File.OpenRead(path));
await using var reader = ReaderFactory.OpenAsyncReader(new AsyncOnlyStream(stream));
using var reader = ReaderFactory.Open(stream);
// This should not throw, even if internal FlushAsync() fails
while (await reader.MoveToNextEntryAsync())
@@ -286,7 +286,7 @@ public class ZipReaderAsyncTests : ReaderTests
// when FlushAsync() fails on non-seekable streams (LZMA compression)
var path = Path.Combine(TEST_ARCHIVES_PATH, "Zip.lzma.dd.zip");
using Stream stream = new ForwardOnlyStream(File.OpenRead(path));
await using var reader = ReaderFactory.OpenAsyncReader(new AsyncOnlyStream(stream));
using var reader = ReaderFactory.Open(stream);
// This should not throw, even if internal FlushAsync() fails
while (await reader.MoveToNextEntryAsync())

View File

@@ -444,7 +444,7 @@ public class ZipReaderTests : ReaderTests
// when Flush() fails on non-seekable streams (Deflate compression)
var path = Path.Combine(TEST_ARCHIVES_PATH, "Zip.deflate.dd.zip");
using Stream stream = new ForwardOnlyStream(File.OpenRead(path));
using var reader = ReaderFactory.OpenReader(stream);
using var reader = ReaderFactory.Open(stream);
// This should not throw, even if internal Flush() fails
while (reader.MoveToNextEntry())
@@ -467,7 +467,7 @@ public class ZipReaderTests : ReaderTests
// when Flush() fails on non-seekable streams (LZMA compression)
var path = Path.Combine(TEST_ARCHIVES_PATH, "Zip.lzma.dd.zip");
using Stream stream = new ForwardOnlyStream(File.OpenRead(path));
using var reader = ReaderFactory.OpenReader(stream);
using var reader = ReaderFactory.Open(stream);
// This should not throw, even if internal Flush() fails
while (reader.MoveToNextEntry())