Dispose underlying stream in TarReader.DisposeAsync() as well (#79920)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 23 Dec 2022 13:30:06 +0000 (14:30 +0100)
committerGitHub <noreply@github.com>
Fri, 23 Dec 2022 13:30:06 +0000 (14:30 +0100)
commit372adbf8a4fcfe788e8f0fca3ed0fb9423099a76
treef72c76e6373b8c88f68d380531b255d03d31c692
parent8aa8f689248eb49a17157d3523db38376695d644
Dispose underlying stream in TarReader.DisposeAsync() as well (#79920)

* Dispose underlying stream in TarReader.DisposeAsync() as well

Same as https://github.com/dotnet/runtime/pull/79899

* Consolidate duplicated WrappedStream test helpers to Common sources

* Dispose stream passed to WrappedStream
src/libraries/Common/tests/System/IO/WrappedStream.cs [moved from src/libraries/System.Formats.Tar/tests/WrappedStream.cs with 98% similarity]
src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarReader.cs
src/libraries/System.Formats.Tar/tests/System.Formats.Tar.Tests.csproj
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LongFile.Tests.cs
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.LongFile.Tests.cs
src/libraries/System.IO.Compression/tests/System.IO.Compression.Tests.csproj
src/libraries/System.IO.Compression/tests/Utilities/WrappedStream.cs [deleted file]