mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-12-04 09:43:23 +02:00
Fix data race in periodic reader tests (#4731)
This commit is contained in:
parent
47ba653e69
commit
204be6157f
@ -202,8 +202,6 @@ type periodicReaderTestSuite struct {
|
||||
}
|
||||
|
||||
func (ts *periodicReaderTestSuite) SetupTest() {
|
||||
ts.Reader = ts.Factory()
|
||||
|
||||
e := &fnExporter{
|
||||
exportFunc: func(context.Context, *metricdata.ResourceMetrics) error { return assert.AnError },
|
||||
flushFunc: func(context.Context) error { return assert.AnError },
|
||||
@ -429,12 +427,13 @@ func TestPeriodicReaderMultipleForceFlush(t *testing.T) {
|
||||
r.register(testSDKProducer{})
|
||||
require.NoError(t, r.ForceFlush(ctx))
|
||||
require.NoError(t, r.ForceFlush(ctx))
|
||||
require.NoError(t, r.Shutdown(ctx))
|
||||
}
|
||||
|
||||
func BenchmarkPeriodicReader(b *testing.B) {
|
||||
b.Run("Collect", benchReaderCollectFunc(
|
||||
NewPeriodicReader(new(fnExporter)),
|
||||
))
|
||||
r := NewPeriodicReader(new(fnExporter))
|
||||
b.Run("Collect", benchReaderCollectFunc(r))
|
||||
require.NoError(b, r.Shutdown(context.Background()))
|
||||
}
|
||||
|
||||
func TestPeriodiclReaderTemporality(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user