(t testing.TB, w Writer, data []testData)
| 836 | } |
| 837 | |
| 838 | func cutTestBlockWithTraces(t testing.TB, w Writer, data []testData) common.BackendBlock { |
| 839 | dec := model.MustNewSegmentDecoder(model.CurrentEncoding) |
| 840 | |
| 841 | wal := w.WAL() |
| 842 | |
| 843 | meta := &backend.BlockMeta{BlockID: backend.NewUUID(), TenantID: testTenantID} |
| 844 | head, err := wal.NewBlock(meta, model.CurrentEncoding) |
| 845 | require.NoError(t, err) |
| 846 | |
| 847 | for _, d := range data { |
| 848 | writeTraceToWal(t, head, dec, d.id, d.t, d.start, d.end) |
| 849 | } |
| 850 | |
| 851 | b, err := w.CompleteBlock(context.Background(), head) |
| 852 | require.NoError(t, err) |
| 853 | |
| 854 | return b |
| 855 | } |
| 856 | |
| 857 | func cutTestBlocks(t testing.TB, w Writer, tenantID string, blockCount int, recordCount int) []common.BackendBlock { |
| 858 | blocks := make([]common.BackendBlock, 0) |
no test coverage detected