diff --git a/scrape/scrape_test.go b/scrape/scrape_test.go index c30184a1c..ab79f4e2a 100644 --- a/scrape/scrape_test.go +++ b/scrape/scrape_test.go @@ -2830,7 +2830,7 @@ func TestScrapeReportLimit(t *testing.T) { var found bool for series.Next() { i := series.At().Iterator() - for i.Next() { + for i.Next() == chunkenc.ValFloat { _, v := i.At() require.Equal(t, 1.0, v) found = true diff --git a/storage/remote/codec.go b/storage/remote/codec.go index 58646f887..c590c346e 100644 --- a/storage/remote/codec.go +++ b/storage/remote/codec.go @@ -363,7 +363,7 @@ func (c *concreteSeriesIterator) Seek(t int64) chunkenc.ValueType { c.cur = 0 } if c.cur >= len(c.series.samples) { - return false + return chunkenc.ValNone } // No-op check. if s := c.series.samples[c.cur]; s.Timestamp >= t { diff --git a/storage/remote/codec_test.go b/storage/remote/codec_test.go index cd67bbc6b..4d59087e8 100644 --- a/storage/remote/codec_test.go +++ b/storage/remote/codec_test.go @@ -236,9 +236,9 @@ func TestConcreteSeriesIterator(t *testing.T) { require.Equal(t, 3., v) // Seek beyond the end. - require.False(t, it.Seek(5)) + require.Equal(t, chunkenc.ValNone, it.Seek(5)) // And we don't go back. (This exposes issue #10027.) - require.False(t, it.Seek(2)) + require.Equal(t, chunkenc.ValNone, it.Seek(2)) } func TestFromQueryResultWithDuplicates(t *testing.T) { diff --git a/storage/series.go b/storage/series.go index 4d78c3605..eacd1fa7a 100644 --- a/storage/series.go +++ b/storage/series.go @@ -119,7 +119,7 @@ func (it *listSeriesIterator) Seek(t int64) chunkenc.ValueType { it.idx = 0 } if it.idx >= it.samples.Len() { - return false + return chunkenc.ValNone } // No-op check. if s := it.samples.Get(it.idx); s.T() >= t { diff --git a/storage/series_test.go b/storage/series_test.go index feef1ec2b..b200a3fc4 100644 --- a/storage/series_test.go +++ b/storage/series_test.go @@ -61,7 +61,7 @@ func TestListSeriesIterator(t *testing.T) { require.Equal(t, 3., v) // Seek beyond the end. - require.False(t, it.Seek(5)) + require.Equal(t, chunkenc.ValNone, it.Seek(5)) // And we don't go back. (This exposes issue #10027.) - require.False(t, it.Seek(2)) + require.Equal(t, chunkenc.ValNone, it.Seek(2)) } diff --git a/tsdb/tsdbutil/buffer_test.go b/tsdb/tsdbutil/buffer_test.go index 443cf900d..263e2681e 100644 --- a/tsdb/tsdbutil/buffer_test.go +++ b/tsdb/tsdbutil/buffer_test.go @@ -181,7 +181,7 @@ func (it *listSeriesIterator) Seek(t int64) chunkenc.ValueType { it.idx = 0 } if it.idx >= len(it.list) { - return false + return chunkenc.ValNone } // No-op check. if s := it.list[it.idx]; s.t >= t {