Skip to content

Commit

Permalink
unit test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thejas-bhat committed Aug 29, 2024
1 parent 0479ad6 commit 8677bf7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,28 @@ func buildTestSegment() (*SegmentBase, uint64, error) {
doc,
}

seg, size, err := zapPlugin.newWithChunkMode(results, DefaultChunkMode)
seg, size, err := zapPlugin.newWithChunkMode(results, DefaultChunkMode, nil)
return seg.(*SegmentBase), size, err
}

func buildTestSegmentMulti() (*SegmentBase, uint64, error) {
results := buildTestAnalysisResultsMulti()

seg, size, err := zapPlugin.newWithChunkMode(results, DefaultChunkMode)
seg, size, err := zapPlugin.newWithChunkMode(results, DefaultChunkMode, nil)
return seg.(*SegmentBase), size, err
}

func buildTestSegmentMultiWithChunkFactor(chunkFactor uint32) (*SegmentBase, uint64, error) {
results := buildTestAnalysisResultsMulti()

seg, size, err := zapPlugin.newWithChunkMode(results, chunkFactor)
seg, size, err := zapPlugin.newWithChunkMode(results, chunkFactor, nil)
return seg.(*SegmentBase), size, err
}

func buildTestSegmentMultiWithDifferentFields(includeDocA, includeDocB bool) (*SegmentBase, uint64, error) {
results := buildTestAnalysisResultsMultiWithDifferentFields(includeDocA, includeDocB)

seg, size, err := zapPlugin.newWithChunkMode(results, DefaultChunkMode)
seg, size, err := zapPlugin.newWithChunkMode(results, DefaultChunkMode, nil)
return seg.(*SegmentBase), size, err
}

Expand Down Expand Up @@ -152,7 +152,7 @@ func buildTestSegmentWithDefaultFieldMapping(chunkFactor uint32) (
doc,
}

sb, _, err := zapPlugin.newWithChunkMode(results, chunkFactor)
sb, _, err := zapPlugin.newWithChunkMode(results, chunkFactor, nil)

return sb.(*SegmentBase), fields, err
}
2 changes: 1 addition & 1 deletion dict_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func buildTestSegmentForDict() (*SegmentBase, uint64, error) {
doc,
}

seg, size, err := zapPlugin.newWithChunkMode(results, 1024)
seg, size, err := zapPlugin.newWithChunkMode(results, 1024, nil)
return seg.(*SegmentBase), size, err
}

Expand Down
4 changes: 2 additions & 2 deletions merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func testMergeWithEmptySegments(t *testing.T, before bool, numEmptySegments int)

_ = os.RemoveAll("/tmp/" + fname)

emptySegment, _, err := zapPlugin.newWithChunkMode([]index.Document{}, 1024)
emptySegment, _, err := zapPlugin.newWithChunkMode([]index.Document{}, 1024, nil)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -644,7 +644,7 @@ func buildTestSegmentMultiHelper(docIds []string) (*SegmentBase, uint64, error)
doc2,
}

seg, size, err := zapPlugin.newWithChunkMode(results, 1024)
seg, size, err := zapPlugin.newWithChunkMode(results, 1024, nil)
return seg.(*SegmentBase), size, err
}

Expand Down

0 comments on commit 8677bf7

Please sign in to comment.