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

Function TestProtoParquetRoundTrip

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

Source from the content-addressed store, hash-verified

27)
28
29func TestProtoParquetRoundTrip(t *testing.T) {
30 // This test round trips a proto trace and checks that the transformation works as expected
31 // Proto -> Parquet -> Proto
32 meta := backend.BlockMeta{
33 DedicatedColumns: test.MakeDedicatedColumns(),
34 }
35 traceIDA := []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F}
36
37 expectedTrace := ParquetTraceToTempopbTrace(&meta, fullyPopulatedTestTrace(traceIDA))
38
39 parquetTrace, connected := traceToParquet(&meta, traceIDA, expectedTrace, nil)
40 require.True(t, connected)
41 actualTrace := ParquetTraceToTempopbTrace(&meta, parquetTrace)
42
43 // assert.Equal(t, expectedTrace, actualTrace)
44 tempopbTraceEqual(t, expectedTrace, actualTrace)
45}
46
47func TestProtoToParquetEmptyTrace(t *testing.T) {
48 want := &Trace{

Callers

nothing calls this directly

Calls 5

MakeDedicatedColumnsFunction · 0.92
fullyPopulatedTestTraceFunction · 0.70
traceToParquetFunction · 0.70
tempopbTraceEqualFunction · 0.70

Tested by

no test coverage detected