From 8773a30a02a69db34ea63259bb2511455fe4e150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Thu, 22 Dec 2022 12:15:05 +0100 Subject: [PATCH] Clean up tar file at the end of WriteEntry_LongFileSizeAsync test Otherwise multiple tar files could stick around for some time, contributing to issues like https://github.com/dotnet/runtime/issues/77012 --- .../tests/TarWriter/TarWriter.WriteEntry.LongFile.Tests.cs | 1 + .../tests/TarWriter/TarWriter.WriteEntryAsync.LongFile.Tests.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LongFile.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LongFile.Tests.cs index 6fd2166e81c35f..41e0a61005112a 100644 --- a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LongFile.Tests.cs +++ b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LongFile.Tests.cs @@ -86,6 +86,7 @@ public void WriteEntry_LongFileSize(TarEntryFormat entryFormat, long size, bool Assert.Equal(size, dataStream.Position); Assert.Null(reader.GetNextEntry()); + tarFile.Close(); } } } diff --git a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.LongFile.Tests.cs b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.LongFile.Tests.cs index 0f6202662d6097..ce8c4a4f945b6c 100644 --- a/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.LongFile.Tests.cs +++ b/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntryAsync.LongFile.Tests.cs @@ -76,6 +76,7 @@ public async Task WriteEntry_LongFileSizeAsync(TarEntryFormat entryFormat, long Assert.Equal(size, dataStream.Position); Assert.Null(await reader.GetNextEntryAsync()); + tarFile.Close(); } } }