diff options
| author | hilimd <68371223+hilimd@users.noreply.github.com> | 2020-07-21 14:08:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-21 14:08:18 +0800 |
| commit | 6ea4ce722704171fdbddba61f423202a620b6ecf (patch) | |
| tree | b4e3e1deb1133cc7d34757c0981e30dabe196a03 /weed/filer2/filechunks_test.go | |
| parent | 5850bb733936399babbe2d77f4b27cac312e2798 (diff) | |
| parent | 885c624bceb61688c806b91350e70d75088c6eea (diff) | |
| download | seaweedfs-6ea4ce722704171fdbddba61f423202a620b6ecf.tar.xz seaweedfs-6ea4ce722704171fdbddba61f423202a620b6ecf.zip | |
Merge pull request #3 from chrislusf/master
sync
Diffstat (limited to 'weed/filer2/filechunks_test.go')
| -rw-r--r-- | weed/filer2/filechunks_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/filer2/filechunks_test.go b/weed/filer2/filechunks_test.go index 7b1133b85..bfee59198 100644 --- a/weed/filer2/filechunks_test.go +++ b/weed/filer2/filechunks_test.go @@ -16,7 +16,7 @@ func TestCompactFileChunks(t *testing.T) { {Offset: 110, Size: 200, FileId: "jkl", Mtime: 300}, } - compacted, garbage := CompactFileChunks(chunks) + compacted, garbage := CompactFileChunks(nil, chunks) if len(compacted) != 3 { t.Fatalf("unexpected compacted: %d", len(compacted)) @@ -49,7 +49,7 @@ func TestCompactFileChunks2(t *testing.T) { }) } - compacted, garbage := CompactFileChunks(chunks) + compacted, garbage := CompactFileChunks(nil, chunks) if len(compacted) != 4 { t.Fatalf("unexpected compacted: %d", len(compacted)) @@ -186,7 +186,7 @@ func TestIntervalMerging(t *testing.T) { for i, testcase := range testcases { log.Printf("++++++++++ merged test case %d ++++++++++++++++++++", i) - intervals := NonOverlappingVisibleIntervals(testcase.Chunks) + intervals, _ := NonOverlappingVisibleIntervals(nil, testcase.Chunks) for x, interval := range intervals { log.Printf("test case %d, interval %d, start=%d, stop=%d, fileId=%s", i, x, interval.start, interval.stop, interval.fileId) @@ -371,7 +371,7 @@ func TestChunksReading(t *testing.T) { for i, testcase := range testcases { log.Printf("++++++++++ read test case %d ++++++++++++++++++++", i) - chunks := ViewFromChunks(testcase.Chunks, testcase.Offset, testcase.Size) + chunks := ViewFromChunks(nil, testcase.Chunks, testcase.Offset, testcase.Size) for x, chunk := range chunks { log.Printf("read case %d, chunk %d, offset=%d, size=%d, fileId=%s", i, x, chunk.Offset, chunk.Size, chunk.FileId) @@ -415,6 +415,6 @@ func BenchmarkCompactFileChunks(b *testing.B) { } for n := 0; n < b.N; n++ { - CompactFileChunks(chunks) + CompactFileChunks(nil, chunks) } } |
