Fix broken tests

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
This commit is contained in:
Goutham Veeramachaneni 2017-05-01 15:01:17 +05:30
parent 6169c33fb8
commit 8b43b0d2c1
No known key found for this signature in database
GPG key ID: F1C217E8E9023CAD
2 changed files with 8 additions and 3 deletions

View file

@ -400,7 +400,7 @@ func (s *populatedChunkSeries) Next() bool {
for s.set.Next() { for s.set.Next() {
lset, chks := s.set.At() lset, chks := s.set.At()
from := 0 from := -1
for i, c := range chks { for i, c := range chks {
if c.MaxTime < s.mint { if c.MaxTime < s.mint {
from = i from = i

View file

@ -862,11 +862,16 @@ func TestPopulatedCSReturnsValidChunkSlice(t *testing.T) {
set: m, set: m,
chunks: cr, chunks: cr,
mint: 6, mint: 0,
maxt: 9, maxt: 0,
} }
require.False(t, p.Next()) require.False(t, p.Next())
p.mint = 6
p.maxt = 9
require.False(t, p.Next())
return return
} }