At() should not be called once Next() returns false.
(t *testing.T)
| 300 | |
| 301 | // At() should not be called once Next() returns false. |
| 302 | func TestBufferedSeriesIteratorNoBadAt(t *testing.T) { |
| 303 | done := false |
| 304 | |
| 305 | m := &mockSeriesIterator{ |
| 306 | seek: func(int64) chunkenc.ValueType { return chunkenc.ValNone }, |
| 307 | at: func() (int64, float64) { |
| 308 | require.False(t, done, "unexpectedly done") |
| 309 | done = true |
| 310 | return 0, 0 |
| 311 | }, |
| 312 | next: func() chunkenc.ValueType { |
| 313 | if done { |
| 314 | return chunkenc.ValNone |
| 315 | } |
| 316 | return chunkenc.ValFloat |
| 317 | }, |
| 318 | err: func() error { return nil }, |
| 319 | } |
| 320 | |
| 321 | it := NewBufferIterator(m, 60) |
| 322 | it.Next() |
| 323 | it.Next() |
| 324 | } |
| 325 | |
| 326 | func TestBufferedSeriesIteratorMixedHistograms(t *testing.T) { |
| 327 | histograms := tsdbutil.GenerateTestHistograms(2) |
nothing calls this directly
no test coverage detected
searching dependent graphs…