(s *mockQueryStreamServer)
| 105 | } |
| 106 | |
| 107 | func seriesSetFromResponseStream(s *mockQueryStreamServer) (storage.SeriesSet, error) { |
| 108 | serieses := make([]storage.Series, 0, len(s.series)) |
| 109 | |
| 110 | for _, result := range s.series { |
| 111 | ls := cortexpb.FromLabelAdaptersToLabels(result.Labels) |
| 112 | |
| 113 | chunks, err := chunkcompat.FromChunks(ls, result.Chunks) |
| 114 | if err != nil { |
| 115 | return nil, err |
| 116 | } |
| 117 | |
| 118 | serieses = append(serieses, &storage.SeriesEntry{ |
| 119 | Lset: ls, |
| 120 | SampleIteratorFn: func(it chunkenc.Iterator) chunkenc.Iterator { |
| 121 | return batch.NewChunkMergeIterator(it, chunks, math.MinInt64, math.MaxInt64) |
| 122 | }, |
| 123 | }) |
| 124 | } |
| 125 | set := series.NewConcreteSeriesSet(false, serieses) |
| 126 | return set, nil |
| 127 | } |
| 128 | |
| 129 | func TestMatcherCache(t *testing.T) { |
| 130 | limits := defaultLimitsTestConfig() |
no test coverage detected