mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix tests
This commit is contained in:
parent
b71df82292
commit
8c9e6eaacd
|
@ -143,7 +143,7 @@ func ViewFromVisibleIntervals(visibles []VisibleInterval, offset int64, size int
|
||||||
FileId: chunk.fileId,
|
FileId: chunk.fileId,
|
||||||
Offset: chunkStart-chunk.start,
|
Offset: chunkStart-chunk.start,
|
||||||
Size: uint64(chunkStop - chunkStart),
|
Size: uint64(chunkStop - chunkStart),
|
||||||
LogicOffset: chunk.start,
|
LogicOffset: chunkStart,
|
||||||
ChunkSize: chunk.chunkSize,
|
ChunkSize: chunk.chunkSize,
|
||||||
CipherKey: chunk.cipherKey,
|
CipherKey: chunk.cipherKey,
|
||||||
IsGzipped: chunk.isGzipped,
|
IsGzipped: chunk.isGzipped,
|
||||||
|
|
|
@ -290,7 +290,7 @@ func TestChunksReading(t *testing.T) {
|
||||||
Size: 400,
|
Size: 400,
|
||||||
Expected: []*ChunkView{
|
Expected: []*ChunkView{
|
||||||
{Offset: 0, Size: 200, FileId: "asdf", LogicOffset: 0},
|
{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
|
// case 5: updates overwrite full chunks
|
||||||
|
|
Loading…
Reference in a new issue