Close reader after the test is finished.
Signed-off-by: yuzou <zouyu7@huawei.com>
This commit is contained in:
parent
fed58bd2d3
commit
0fc7babf76
1 changed files with 1 additions and 0 deletions
|
@ -258,6 +258,7 @@ func (suite *DriverSuite) TestWriteReadLargeStreams(c *check.C) {
|
||||||
|
|
||||||
reader, err := suite.StorageDriver.ReadStream(suite.ctx, filename, 0)
|
reader, err := suite.StorageDriver.ReadStream(suite.ctx, filename, 0)
|
||||||
c.Assert(err, check.IsNil)
|
c.Assert(err, check.IsNil)
|
||||||
|
defer reader.Close()
|
||||||
|
|
||||||
writtenChecksum := sha1.New()
|
writtenChecksum := sha1.New()
|
||||||
io.Copy(writtenChecksum, reader)
|
io.Copy(writtenChecksum, reader)
|
||||||
|
|
Loading…
Reference in a new issue