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

Function TestProtoParquetRando

tempodb/encoding/vparquet4/schema_test.go:59–70  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

57}
58
59func TestProtoParquetRando(t *testing.T) {
60 trp := &Trace{}
61 for i := 0; i < 100; i++ {
62 batches := rand.Intn(15)
63 id := test.ValidTraceID(nil)
64 expectedTrace := test.AddDedicatedAttributes(test.MakeTrace(batches, id))
65
66 parqTr, _ := traceToParquet(&backend.BlockMeta{}, id, expectedTrace, trp)
67 actualTrace := ParquetTraceToTempopbTrace(&backend.BlockMeta{}, parqTr)
68 require.Equal(t, expectedTrace, actualTrace)
69 }
70}
71
72func TestFieldsAreCleared(t *testing.T) {
73 meta := backend.BlockMeta{

Callers

nothing calls this directly

Calls 6

ValidTraceIDFunction · 0.92
AddDedicatedAttributesFunction · 0.92
MakeTraceFunction · 0.92
traceToParquetFunction · 0.70
EqualMethod · 0.45

Tested by

no test coverage detected