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

Function TestProtoParquetRando

tempodb/encoding/vparquet3/schema_test.go:52–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

50}
51
52func TestProtoParquetRando(t *testing.T) {
53 trp := &Trace{}
54 for i := 0; i < 100; i++ {
55 batches := rand.Intn(15)
56 id := test.ValidTraceID(nil)
57 expectedTrace := test.AddDedicatedAttributes(test.MakeTrace(batches, id))
58
59 parqTr, _ := traceToParquet(&backend.BlockMeta{}, id, expectedTrace, trp)
60 actualTrace := ParquetTraceToTempopbTrace(&backend.BlockMeta{}, parqTr)
61 require.Equal(t, expectedTrace, actualTrace)
62 }
63}
64
65func TestFieldsAreCleared(t *testing.T) {
66 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