(t *testing.T, cacheResponse *tempopb.SearchResponse, pipelineResp *tempopb.SearchResponse)
| 662 | } |
| 663 | |
| 664 | func cacheResponsesEqual(t *testing.T, cacheResponse *tempopb.SearchResponse, pipelineResp *tempopb.SearchResponse) { |
| 665 | // zeroing these out b/c they are set by the sharder and won't be in cache |
| 666 | pipelineResp.Metrics.TotalJobs = 0 |
| 667 | pipelineResp.Metrics.CompletedJobs = 0 |
| 668 | pipelineResp.Metrics.TotalBlockBytes = 0 |
| 669 | pipelineResp.Metrics.TotalBlocks = 0 |
| 670 | |
| 671 | // cache won't have "root span not yet received" text |
| 672 | for _, tr := range pipelineResp.Traces { |
| 673 | if tr.RootServiceName == search.RootSpanNotYetReceivedText { |
| 674 | tr.RootServiceName = "" |
| 675 | } |
| 676 | } |
| 677 | |
| 678 | require.Equal(t, pipelineResp, cacheResponse) |
| 679 | } |
| 680 | |
| 681 | func TestSearchCachedMetrics(t *testing.T) { |
| 682 | // set up backend |
no test coverage detected