mirror of
https://github.com/hanzoai/telemetry.git
synced 2026-10-30 20:01:49 +00:00
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description <!-- Issue number if applicable --> I forgot to move these symbols in #13821. #### Link to tracking issue Relates to open-telemetry/opentelemetry-collector-contrib/pull/42782, which is how I noticed. Follows #13821 Updates #11143
28 lines
783 B
Go
28 lines
783 B
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package queuebatch // import "go.opentelemetry.io/collector/exporter/exporterhelper/internal/queuebatch"
|
|
|
|
import (
|
|
"errors"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"go.opentelemetry.io/collector/consumer/consumererror"
|
|
"go.opentelemetry.io/collector/exporter/exporterhelper/internal/request"
|
|
"go.opentelemetry.io/collector/pdata/pmetric"
|
|
"go.opentelemetry.io/collector/pdata/testdata"
|
|
)
|
|
|
|
func TestMetricsRequest(t *testing.T) {
|
|
mr := newMetricsRequest(testdata.GenerateMetrics(1))
|
|
|
|
metricsErr := consumererror.NewMetrics(errors.New("some error"), pmetric.NewMetrics())
|
|
assert.Equal(
|
|
t,
|
|
newMetricsRequest(pmetric.NewMetrics()),
|
|
mr.(request.ErrorHandler).OnError(metricsErr),
|
|
)
|
|
}
|