MCPcopy
hub / github.com/grafana/tempo / drainStreamingClient

Function drainStreamingClient

integration/operations/operational_metrics_test.go:192–207  ·  view source on GitHub ↗
(stream streamingClient[T])

Source from the content-addressed store, hash-verified

190}
191
192func drainStreamingClient[T any](stream streamingClient[T]) error {
193 for {
194 resp, err := stream.Recv()
195 if resp != nil {
196 break
197 }
198 if errors.Is(err, io.EOF) {
199 return nil
200 }
201 if err != nil {
202 return err
203 }
204 }
205
206 return nil
207}
208
209func assertMetricEquals(t *testing.T, service *e2e.HTTPService, metric string, expected float64, labelValues map[string]string) {
210 t.Helper()

Callers 1

TestReadMetricsFunction · 0.85

Calls 1

RecvMethod · 0.65

Tested by

no test coverage detected