Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <benye@amazon.com>
  • Loading branch information
yeya24 committed May 17, 2024
1 parent 7b5e066 commit cd11598
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tsdb/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ func TestBlockIndexReader_PostingsForLabelMatching(t *testing.T) {
require.NoError(t, err)
require.NotEmpty(t, files, "No chunk created.")

block, err := OpenBlock(nil, blockDir, nil)
block, err := OpenBlock(nil, blockDir, nil, nil)
require.NoError(t, err)
t.Cleanup(func() { require.NoError(t, block.Close()) })

Expand Down
3 changes: 2 additions & 1 deletion tsdb/index/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ func BenchmarkReader_ShardedPostings(b *testing.B) {
}

func TestDecoder_Postings_WrongInput(t *testing.T) {
_, _, err := (&Decoder{DecodePostings: DecodePostingsRaw}).DecodePostings([]byte("the cake is a lie"))
d := encoding.Decbuf{B: []byte("the cake is a lie")}
_, _, err := (&Decoder{DecodePostings: DecodePostingsRaw}).DecodePostings(d)
require.Error(t, err)
}

Expand Down

0 comments on commit cd11598

Please sign in to comment.