[PR #403] [MERGED] Fix and re-enable tests #1010

Open
opened 2026-01-29 22:18:35 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/403
Author: @MattKotsenas
Created: 7/10/2018
Status: Merged
Merged: 7/10/2018
Merged by: @adamhathcock

Base: masterHead: bugfix/parallel-tests


📝 Commits (3)

  • 7b33851 Create unique scratch path per test
  • 3114afd Add workaround for in-use files
  • 2d87351 Add tests back to AppVeyor

📊 Changes

15 files changed (+18 additions, -74 deletions)

View changed files

📝 build.cake (+1 -1)
📝 tests/SharpCompress.Test/ArchiveTests.cs (+0 -4)
📝 tests/SharpCompress.Test/GZip/GZipArchiveTests.cs (+0 -4)
📝 tests/SharpCompress.Test/GZip/GZipWriterTests.cs (+0 -3)
📝 tests/SharpCompress.Test/Rar/RarArchiveTests.cs (+0 -8)
📝 tests/SharpCompress.Test/Rar/RarHeaderFactoryTest.cs (+0 -1)
📝 tests/SharpCompress.Test/Rar/RarReaderTests.cs (+0 -9)
📝 tests/SharpCompress.Test/ReaderTests.cs (+0 -1)
📝 tests/SharpCompress.Test/Tar/TarArchiveTests.cs (+0 -4)
📝 tests/SharpCompress.Test/Tar/TarReaderTests.cs (+0 -2)
📝 tests/SharpCompress.Test/TestBase.cs (+17 -17)
📝 tests/SharpCompress.Test/WriterTests.cs (+0 -1)
📝 tests/SharpCompress.Test/Zip/Zip64Tests.cs (+0 -1)
📝 tests/SharpCompress.Test/Zip/ZipArchiveTests.cs (+0 -10)
📝 tests/SharpCompress.Test/Zip/ZipReaderTests.cs (+0 -8)

📄 Description

Fix two problems with the test harness

  1. Give each test its own unique scratch space to prevent conflicts between tests

As part of having a unique scratch space, we can remove the ResetScratch() method and make the tests simpler and more resilient.

  1. Avoid leaking file handles by forcing a garbage collection prior to cleanup for each test

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/403 **Author:** [@MattKotsenas](https://github.com/MattKotsenas) **Created:** 7/10/2018 **Status:** ✅ Merged **Merged:** 7/10/2018 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `bugfix/parallel-tests` --- ### 📝 Commits (3) - [`7b33851`](https://github.com/adamhathcock/sharpcompress/commit/7b338511cc99b83eb586c655c35acd6f5a3affec) Create unique scratch path per test - [`3114afd`](https://github.com/adamhathcock/sharpcompress/commit/3114afde0ea4acfa8de907b4d5dc8f027a7fec3e) Add workaround for in-use files - [`2d87351`](https://github.com/adamhathcock/sharpcompress/commit/2d87351d2a507d10c059d5f3036c0ede45ec51d4) Add tests back to AppVeyor ### 📊 Changes **15 files changed** (+18 additions, -74 deletions) <details> <summary>View changed files</summary> 📝 `build.cake` (+1 -1) 📝 `tests/SharpCompress.Test/ArchiveTests.cs` (+0 -4) 📝 `tests/SharpCompress.Test/GZip/GZipArchiveTests.cs` (+0 -4) 📝 `tests/SharpCompress.Test/GZip/GZipWriterTests.cs` (+0 -3) 📝 `tests/SharpCompress.Test/Rar/RarArchiveTests.cs` (+0 -8) 📝 `tests/SharpCompress.Test/Rar/RarHeaderFactoryTest.cs` (+0 -1) 📝 `tests/SharpCompress.Test/Rar/RarReaderTests.cs` (+0 -9) 📝 `tests/SharpCompress.Test/ReaderTests.cs` (+0 -1) 📝 `tests/SharpCompress.Test/Tar/TarArchiveTests.cs` (+0 -4) 📝 `tests/SharpCompress.Test/Tar/TarReaderTests.cs` (+0 -2) 📝 `tests/SharpCompress.Test/TestBase.cs` (+17 -17) 📝 `tests/SharpCompress.Test/WriterTests.cs` (+0 -1) 📝 `tests/SharpCompress.Test/Zip/Zip64Tests.cs` (+0 -1) 📝 `tests/SharpCompress.Test/Zip/ZipArchiveTests.cs` (+0 -10) 📝 `tests/SharpCompress.Test/Zip/ZipReaderTests.cs` (+0 -8) </details> ### 📄 Description Fix two problems with the test harness 1. Give each test its own unique scratch space to prevent conflicts between tests As part of having a unique scratch space, we can remove the `ResetScratch()` method and make the tests simpler and more resilient. 2. Avoid leaking file handles by forcing a garbage collection prior to cleanup for each test --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:18:35 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1010