Skip to content

Commit

Permalink
feat: move jaeger tests to a separate package
Browse files Browse the repository at this point in the history
move jaeger usage to a separate package to let module pruning do
the magic and remove it from the module graph for downstream clients.
  • Loading branch information
kruskall committed Dec 3, 2024
1 parent 6037746 commit f9f0ac2
Show file tree
Hide file tree
Showing 26 changed files with 704 additions and 634 deletions.
696 changes: 696 additions & 0 deletions input/jaeger/jaeger_test.go

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions input/otlp/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,14 @@ func transformMetrics(t *testing.T, metrics pmetric.Metrics) ([]*modelpb.APMEven
return *batches[0], consumer.Stats(), result, err
}

func batchRecorderBatchProcessor(out *[]*modelpb.Batch) modelpb.BatchProcessor {
return modelpb.ProcessBatchFunc(func(ctx context.Context, batch *modelpb.Batch) error {
batchCopy := batch.Clone()
*out = append(*out, &batchCopy)
return nil
})
}

// eventsMatch aims to compare the expected and actual APMEvents however, it will
// be indeterministic for more than one samples and more than one APMEvents
func eventsMatch(t *testing.T, expected []*modelpb.APMEvent, actual []*modelpb.APMEvent) {
Expand Down
Loading

0 comments on commit f9f0ac2

Please sign in to comment.