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

Function TestProtoMarshaler

modules/backendscheduler/backendscheduler_test.go:289–310  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

287}
288
289func TestProtoMarshaler(t *testing.T) {
290 _, err := proto.Marshal(&tempopb.JobDetail{
291 Compaction: &tempopb.CompactionDetail{
292 Input: []string{"input1", "input2"},
293 },
294 })
295 require.NoError(t, err)
296
297 detail := tempopb.JobDetail{
298 Tenant: "test",
299 Compaction: &tempopb.CompactionDetail{
300 Input: []string{"input1", "input2"},
301 },
302 }
303
304 _, err = proto.Marshal(&tempopb.NextJobResponse{
305 JobId: uuid.New().String(),
306 Type: tempopb.JobType_JOB_TYPE_COMPACTION,
307 Detail: detail,
308 })
309 require.NoError(t, err)
310}
311
312func writeTenantBlocks(ctx context.Context, t *testing.T, w backend.Writer, tenant string, count int) []backend.UUID {
313 var (

Callers

nothing calls this directly

Calls 2

MarshalMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected