Close reader after the test is finished.

Signed-off-by: yuzou <zouyu7@huawei.com>
This commit is contained in:
yuzou 2015-07-17 14:55:31 +08:00
parent 5c6c88196d
commit feebd69d26

View file

@ -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)