diff --git a/archive_test.go b/archive_test.go index 759d307..8cf5a25 100644 --- a/archive_test.go +++ b/archive_test.go @@ -31,8 +31,10 @@ func TestArchiveConcurrency(t *testing.T) { var wg sync.WaitGroup + t.Log("== ExtractArchiveFile ==") + // Slam it, see if it breaks. - for _ = range 100_000 { + for _ = range 10_000 { go func() { wg.Add(1) defer wg.Done() @@ -50,6 +52,23 @@ func TestArchiveConcurrency(t *testing.T) { wg.Wait() + t.Log("== ExtractArchive ==") + // Slam it, see if it breaks. + for _ = range 10_000 { + go func() { + wg.Add(1) + defer wg.Done() + + err = archive.Extract(ExtractOptions{ + Overwrite: true, + Folder: testArchiveBaseDir + "/extracted/zip", + }) + assert.NoError(t, err) + }() + } + + wg.Wait() + err = os.RemoveAll(testArchiveBaseDir + "/extracted") assert.NoError(t, err)