Merge pull request #7010 from prometheus/beorn7/fix-test

Fix tests that were broken by #7009
This commit is contained in:
Bartlomiej Plotka 2020-03-19 17:41:02 +00:00 committed by GitHub
commit 8fa4ada9ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -131,7 +131,7 @@ func TestFanoutErrors(t *testing.T) {
defer querier.Close() defer querier.Close()
matcher := labels.MustNewMatcher(labels.MatchEqual, "a", "b") matcher := labels.MustNewMatcher(labels.MatchEqual, "a", "b")
ss, warnings, err := querier.SelectSorted(nil, matcher) ss, warnings, err := querier.Select(true, nil, matcher)
testutil.Equals(t, tc.err, err) testutil.Equals(t, tc.err, err)
testutil.Equals(t, tc.warnings, warnings) testutil.Equals(t, tc.warnings, warnings)
@ -169,11 +169,7 @@ func (errStorage) Close() error {
type errQuerier struct{} type errQuerier struct{}
func (errQuerier) Select(*storage.SelectParams, ...*labels.Matcher) (storage.SeriesSet, storage.Warnings, error) { func (errQuerier) Select(bool, *storage.SelectHints, ...*labels.Matcher) (storage.SeriesSet, storage.Warnings, error) {
return nil, nil, errSelect
}
func (errQuerier) SelectSorted(*storage.SelectParams, ...*labels.Matcher) (storage.SeriesSet, storage.Warnings, error) {
return nil, nil, errSelect return nil, nil, errSelect
} }

View File

@ -1630,7 +1630,7 @@ func testHeadSeriesChunkRace(t *testing.T) {
h.gc() h.gc()
wg.Done() wg.Done()
}() }()
ss, _, err := q.Select(nil, matcher) ss, _, err := q.Select(false, nil, matcher)
testutil.Ok(t, err) testutil.Ok(t, err)
testutil.Ok(t, ss.Err()) testutil.Ok(t, ss.Err())
wg.Wait() wg.Wait()