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(); } } }