mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-13 13:35:28 +00:00
[PR #404] [MERGED] Enable parallel test execution #1011
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/404
Author: @MattKotsenas
Created: 7/12/2018
Status: ✅ Merged
Merged: 7/12/2018
Merged by: @adamhathcock
Base:
master← Head:bugfix/idisposable📝 Commits (10+)
6ae715bMove the TestStream and ForwardOnlyStream to Mocks folder084c5e2Rename StreamTests.cs --> LzmaStreamTests.csa35c66eMove RewindableStreamTest.cs to the Streams/ folderc2bf540Close verification streams in TestBase.CompareArchivesByPath6c2e5e1Cleanup NonDisposingStream for reusecab1ce3Update sub-streams to uniformly inherit from NonDisposingStream1652471Fix Stream leak in ArchiveFactory4cd80e9Simplify GZip bad compression testc6cf0d4Simplify ReaderTests0473ec1Open test archives as read📊 Changes
24 files changed (+218 additions, -473 deletions)
View changed files
📝
src/SharpCompress/Archives/ArchiveFactory.cs(+2 -7)📝
src/SharpCompress/Common/Tar/TarReadOnlySubStream.cs(+5 -6)📝
src/SharpCompress/Common/Volume.cs(+10 -6)➖
src/SharpCompress/IO/AppendingStream.cs(+0 -74)📝
src/SharpCompress/IO/BufferedSubStream.cs(+2 -13)📝
src/SharpCompress/IO/CountingWritableSubStream.cs(+5 -8)📝
src/SharpCompress/IO/ListeningStream.cs(+1 -5)📝
src/SharpCompress/IO/NonDisposingStream.cs(+1 -12)📝
src/SharpCompress/IO/ReadOnlySubStream.cs(+1 -1)📝
tests/SharpCompress.Test/ArchiveTests.cs(+25 -99)📝
tests/SharpCompress.Test/GZip/GZipArchiveTests.cs(+4 -4)📝
tests/SharpCompress.Test/GZip/GZipWriterTests.cs(+6 -10)📝
tests/SharpCompress.Test/Mocks/ForwardOnlyStream.cs(+10 -9)➕
tests/SharpCompress.Test/Mocks/TestStream.cs(+69 -0)📝
tests/SharpCompress.Test/Rar/RarHeaderFactoryTest.cs(+1 -6)📝
tests/SharpCompress.Test/Rar/RarReaderTests.cs(+5 -24)📝
tests/SharpCompress.Test/ReaderTests.cs(+33 -18)📝
tests/SharpCompress.Test/Streams/LzmaStreamTests.cs(+1 -1)📝
tests/SharpCompress.Test/Streams/RewindableStreamTest.cs(+1 -1)📝
tests/SharpCompress.Test/Tar/TarReaderTests.cs(+1 -0)...and 4 more files
📄 Description
Enable test execution by fixing two classes of file locking problems:
IDisposablein the librarySolving these problems generally had one of two solutions:
NonDisposingStreamin additional places so types that were "borrowing" a stream could still follow theDisposepattern without upsetting code analysisLastly, the
IsLockedcheck inTestBasehad to be removed because it isn't parallel-test-execution-aware. Some of that gap is closed by the expanded test coverage inReaderTests, though more is certainly welcome. I chose to stop here to avoid making the PR unmanageable.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.