fix tests

This commit is contained in:
Chris Lu 2020-08-16 01:35:52 -07:00
parent b71df82292
commit 8c9e6eaacd
2 changed files with 2 additions and 2 deletions

View file

@ -143,7 +143,7 @@ func ViewFromVisibleIntervals(visibles []VisibleInterval, offset int64, size int
FileId: chunk.fileId,
Offset: chunkStart-chunk.start,
Size: uint64(chunkStop - chunkStart),
LogicOffset: chunk.start,
LogicOffset: chunkStart,
ChunkSize: chunk.chunkSize,
CipherKey: chunk.cipherKey,
IsGzipped: chunk.isGzipped,

View file

@ -290,7 +290,7 @@ func TestChunksReading(t *testing.T) {
Size: 400,
Expected: []*ChunkView{
{Offset: 0, Size: 200, FileId: "asdf", LogicOffset: 0},
// {Offset: 0, Size: 150, FileId: "xxxx"}, // missing intervals should not happen
{Offset: 0, Size: 150, FileId: "xxxx", LogicOffset: 250},
},
},
// case 5: updates overwrite full chunks