(t *testing.T, expectedTraces int, liveStores ...*e2e.HTTPService)
| 301 | } |
| 302 | |
| 303 | func waitForTraceInLiveStore(t *testing.T, expectedTraces int, liveStores ...*e2e.HTTPService) *e2e.HTTPService { |
| 304 | ch := make(chan *e2e.HTTPService) |
| 305 | timeout := 30 * time.Second |
| 306 | |
| 307 | for _, liveStore := range liveStores { |
| 308 | go func(liveStore *e2e.HTTPService) { |
| 309 | err := liveStore.WaitSumMetrics(e2e.GreaterOrEqual(float64(expectedTraces)), "tempo_live_store_traces_created_total") |
| 310 | if err == nil { |
| 311 | ch <- liveStore |
| 312 | } |
| 313 | }(liveStore) |
| 314 | } |
| 315 | |
| 316 | select { |
| 317 | case liveStore := <-ch: |
| 318 | close(ch) |
| 319 | return liveStore |
| 320 | case <-time.After(timeout): |
| 321 | t.Fatalf("timeout waiting for trace in live-store after %s", timeout) |
| 322 | } |
| 323 | return nil |
| 324 | } |
| 325 | |
| 326 | func waitActivePartitions(t *testing.T, service *e2e.HTTPService, count int) { |
| 327 | matchers := []*labels.Matcher{ |
no outgoing calls
no test coverage detected