Skip to content

Commit

Permalink
Fix occasionally failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Hathcock committed Oct 3, 2016
1 parent f26ba91 commit d7e29f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/SharpCompress.Test/Zip/ZipReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ public override bool CanSeek
[Fact]
public void TestSharpCompressWithEmptyStream()
{
ResetScratch();

MemoryStream stream = new NonSeekableMemoryStream();

using (IWriter zipWriter = WriterFactory.Open(stream, ArchiveType.Zip, CompressionType.Deflate))
Expand All @@ -250,7 +252,9 @@ public void TestSharpCompressWithEmptyStream()
byte[] buf = new byte[bufSize];
int bytesRead = 0;
while ((bytesRead = entry.Read(buf, 0, bufSize)) > 0)
{
tempStream.Write(buf, 0, bytesRead);
}
}
}
}
Expand Down

0 comments on commit d7e29f7

Please sign in to comment.