diff --git a/processor/cloningfanoutconnector_test.go b/processor/cloningfanoutconnector_test.go index 7e3a14d0f73..11c8ed110e2 100644 --- a/processor/cloningfanoutconnector_test.go +++ b/processor/cloningfanoutconnector_test.go @@ -24,7 +24,6 @@ import ( "go.opentelemetry.io/collector/consumer/pdatautil" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/internal/data/testdata" - "go.opentelemetry.io/collector/internal/dataold/testdataold" ) func TestTraceProcessorCloningNotMultiplexing(t *testing.T) { @@ -83,12 +82,12 @@ func TestMetricsProcessorCloningMultiplexing(t *testing.T) { } mfc := NewMetricsCloningFanOutConnector(processors) - md := testdataold.GenerateMetricDataWithCountersHistogramAndSummary() + md := testdata.GenerateMetricsWithCountersHistograms() var wantMetricsCount = 0 for i := 0; i < 2; i++ { wantMetricsCount += md.MetricCount() - err := mfc.ConsumeMetrics(context.Background(), pdatautil.MetricsFromOldInternalMetrics(md)) + err := mfc.ConsumeMetrics(context.Background(), pdatautil.MetricsFromInternalMetrics(md)) if err != nil { t.Errorf("Wanted nil got error") return @@ -100,15 +99,15 @@ func TestMetricsProcessorCloningMultiplexing(t *testing.T) { assert.Equal(t, wantMetricsCount, m.MetricsCount()) metricOrig := md.ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0).Metrics().At(0) allMetrics := m.AllMetrics() - metricClone := pdatautil.MetricsToOldInternalMetrics(allMetrics[0]).ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0).Metrics().At(0) + metricClone := pdatautil.MetricsToInternalMetrics(allMetrics[0]).ResourceMetrics().At(0).InstrumentationLibraryMetrics().At(0).Metrics().At(0) if i < len(processors)-1 { - assert.True(t, md.ResourceMetrics().At(0).Resource() != pdatautil.MetricsToOldInternalMetrics(allMetrics[0]).ResourceMetrics().At(0).Resource()) + assert.True(t, md.ResourceMetrics().At(0).Resource() != pdatautil.MetricsToInternalMetrics(allMetrics[0]).ResourceMetrics().At(0).Resource()) assert.True(t, metricOrig != metricClone) } else { - assert.True(t, md.ResourceMetrics().At(0).Resource() == pdatautil.MetricsToOldInternalMetrics(allMetrics[0]).ResourceMetrics().At(0).Resource()) + assert.True(t, md.ResourceMetrics().At(0).Resource() == pdatautil.MetricsToInternalMetrics(allMetrics[0]).ResourceMetrics().At(0).Resource()) assert.True(t, metricOrig == metricClone) } - assert.EqualValues(t, md.ResourceMetrics().At(0).Resource(), pdatautil.MetricsToOldInternalMetrics(allMetrics[0]).ResourceMetrics().At(0).Resource()) + assert.EqualValues(t, md.ResourceMetrics().At(0).Resource(), pdatautil.MetricsToInternalMetrics(allMetrics[0]).ResourceMetrics().At(0).Resource()) assert.EqualValues(t, metricOrig, metricClone) } } diff --git a/processor/fanoutconnector_test.go b/processor/fanoutconnector_test.go index 2218cdf436a..b7dc4258398 100644 --- a/processor/fanoutconnector_test.go +++ b/processor/fanoutconnector_test.go @@ -25,7 +25,6 @@ import ( "go.opentelemetry.io/collector/consumer/pdatautil" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/internal/data/testdata" - "go.opentelemetry.io/collector/internal/dataold/testdataold" ) func TestTracesProcessorNotMultiplexing(t *testing.T) { @@ -100,12 +99,12 @@ func TestMetricsProcessorMultiplexing(t *testing.T) { } mfc := NewMetricsFanOutConnector(processors) - md := testdataold.GenerateMetricDataOneMetric() + md := testdata.GenerateMetricsOneMetric() var wantMetricsCount = 0 for i := 0; i < 2; i++ { wantMetricsCount += md.MetricCount() - err := mfc.ConsumeMetrics(context.Background(), pdatautil.MetricsFromOldInternalMetrics(md)) + err := mfc.ConsumeMetrics(context.Background(), pdatautil.MetricsFromInternalMetrics(md)) if err != nil { t.Errorf("Wanted nil got error") return @@ -115,7 +114,7 @@ func TestMetricsProcessorMultiplexing(t *testing.T) { for _, p := range processors { m := p.(*exportertest.SinkMetricsExporter) assert.Equal(t, wantMetricsCount, m.MetricsCount()) - assert.EqualValues(t, md, pdatautil.MetricsToOldInternalMetrics(m.AllMetrics()[0])) + assert.EqualValues(t, md, pdatautil.MetricsToInternalMetrics(m.AllMetrics()[0])) } } @@ -129,12 +128,12 @@ func TestMetricsProcessorWhenOneErrors(t *testing.T) { processors[1].(*exportertest.SinkMetricsExporter).SetConsumeMetricsError(errors.New("my_error")) mfc := NewMetricsFanOutConnector(processors) - md := testdataold.GenerateMetricDataOneMetric() + md := testdata.GenerateMetricsOneMetric() var wantMetricsCount = 0 for i := 0; i < 2; i++ { wantMetricsCount += md.MetricCount() - err := mfc.ConsumeMetrics(context.Background(), pdatautil.MetricsFromOldInternalMetrics(md)) + err := mfc.ConsumeMetrics(context.Background(), pdatautil.MetricsFromInternalMetrics(md)) if err == nil { t.Errorf("Wanted error got nil") return