Skip to content

Commit 4596b5e

Browse files
committed
rewind stream in test before reading
Previously a helper method accomplished this. Now, the library uses standard stream-copy APIs, and must remember to also rewind when needed. Fixes live-only test where this rewind was forgotten in Azure#49416.
1 parent 5449a3a commit 4596b5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/storage/Azure.Storage.Common/tests/PooledMemoryStreamTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void StreamCanHoldLongData()
7171
PredictableStream originalStream = new PredictableStream();
7272
PooledMemoryStream arrayPoolStream = new(_pool, bufferPartitionSize);
7373
originalStream.CopyToExactInternal(arrayPoolStream, dataSize, async: false, cancellationToken: default).EnsureCompleted();
74-
originalStream.Position = 0;
74+
arrayPoolStream.Position = 0;
7575

7676
// assert it holds the correct amount of data. other tests assert data validity and it's so expensive to do that here.
7777
// test without blowing up memory

0 commit comments

Comments
 (0)