From b79e04e93982aa1f00c1f3bbc4e9350ab22f03cd Mon Sep 17 00:00:00 2001 From: glorv Date: Mon, 6 Sep 2021 10:17:42 +0800 Subject: [PATCH] add check for the seek position --- br/pkg/storage/s3_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/br/pkg/storage/s3_test.go b/br/pkg/storage/s3_test.go index 886e2e318487d..d55362055d3e2 100644 --- a/br/pkg/storage/s3_test.go +++ b/br/pkg/storage/s3_test.go @@ -746,8 +746,9 @@ func (s *s3Suite) TestOpenSeek(c *C) { offset, err = reader.Seek(p, io.SeekStart) c.Assert(offset, Equals, int64(1000000)) c.Assert(err, IsNil) - _, err = reader.Read(slice) + pos, err := reader.Read(slice) c.Assert(err, Equals, io.EOF) + c.Assert(pos, Equals, int64(1000000)) } }