@@ -70,7 +70,7 @@ func TestProfilesExporter_NilLogger(t *testing.T) {
70
70
}
71
71
72
72
func TestProfilesRequestExporter_NilLogger (t * testing.T ) {
73
- le , err := NewProfilesRequestExporter (context .Background (), exporter.Settings {}, requestFromProfilesFunc (nil ), sendertest .NewNopSenderFunc [exporterhelper.Request ]())
73
+ le , err := NewProfilesRequest (context .Background (), exporter.Settings {}, requestFromProfilesFunc (nil ), sendertest .NewNopSenderFunc [exporterhelper.Request ]())
74
74
require .Nil (t , le )
75
75
require .Equal (t , errNilLogger , err )
76
76
}
@@ -82,13 +82,13 @@ func TestProfilesExporter_NilPushProfilesData(t *testing.T) {
82
82
}
83
83
84
84
func TestProfilesExporter_NilTracesConverter (t * testing.T ) {
85
- te , err := NewProfilesRequestExporter (context .Background (), exportertest .NewNopSettings (exportertest .NopType ), nil , sendertest .NewNopSenderFunc [exporterhelper.Request ]())
85
+ te , err := NewProfilesRequest (context .Background (), exportertest .NewNopSettings (exportertest .NopType ), nil , sendertest .NewNopSenderFunc [exporterhelper.Request ]())
86
86
require .Nil (t , te )
87
87
require .Equal (t , errNilProfilesConverter , err )
88
88
}
89
89
90
90
func TestProfilesRequestExporter_NilProfilesConverter (t * testing.T ) {
91
- le , err := NewProfilesRequestExporter (context .Background (), exportertest .NewNopSettings (exportertest .NopType ), requestFromProfilesFunc (nil ), nil )
91
+ le , err := NewProfilesRequest (context .Background (), exportertest .NewNopSettings (exportertest .NopType ), requestFromProfilesFunc (nil ), nil )
92
92
require .Nil (t , le )
93
93
require .Equal (t , errNilConsumeRequest , err )
94
94
}
@@ -107,7 +107,7 @@ func TestProfilesExporter_Default(t *testing.T) {
107
107
108
108
func TestProfilesRequestExporter_Default (t * testing.T ) {
109
109
ld := pprofile .NewProfiles ()
110
- le , err := NewProfilesRequestExporter (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
110
+ le , err := NewProfilesRequest (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
111
111
requestFromProfilesFunc (nil ), sendertest .NewNopSenderFunc [exporterhelper.Request ]())
112
112
assert .NotNil (t , le )
113
113
require .NoError (t , err )
@@ -129,7 +129,7 @@ func TestProfilesExporter_WithCapabilities(t *testing.T) {
129
129
130
130
func TestProfilesRequestExporter_WithCapabilities (t * testing.T ) {
131
131
capabilities := consumer.Capabilities {MutatesData : true }
132
- le , err := NewProfilesRequestExporter (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
132
+ le , err := NewProfilesRequest (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
133
133
requestFromProfilesFunc (nil ), sendertest .NewNopSenderFunc [exporterhelper.Request ](), exporterhelper .WithCapabilities (capabilities ))
134
134
require .NoError (t , err )
135
135
require .NotNil (t , le )
@@ -149,7 +149,7 @@ func TestProfilesExporter_Default_ReturnError(t *testing.T) {
149
149
func TestProfilesRequestExporter_Default_ConvertError (t * testing.T ) {
150
150
ld := pprofile .NewProfiles ()
151
151
want := errors .New ("convert_error" )
152
- le , err := NewProfilesRequestExporter (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
152
+ le , err := NewProfilesRequest (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
153
153
requestFromProfilesFunc (want ), sendertest .NewNopSenderFunc [exporterhelper.Request ]())
154
154
require .NoError (t , err )
155
155
require .NotNil (t , le )
@@ -159,7 +159,7 @@ func TestProfilesRequestExporter_Default_ConvertError(t *testing.T) {
159
159
func TestProfilesRequestExporter_Default_ExportError (t * testing.T ) {
160
160
ld := pprofile .NewProfiles ()
161
161
want := errors .New ("export_error" )
162
- le , err := NewProfilesRequestExporter (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
162
+ le , err := NewProfilesRequest (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
163
163
requestFromProfilesFunc (nil ), sendertest.NewErrSenderFunc [exporterhelper.Request ](want ))
164
164
require .NoError (t , err )
165
165
require .NotNil (t , le )
@@ -210,7 +210,7 @@ func TestProfilesRequestExporter_WithSpan(t *testing.T) {
210
210
otel .SetTracerProvider (set .TracerProvider )
211
211
defer otel .SetTracerProvider (nooptrace .NewTracerProvider ())
212
212
213
- le , err := NewProfilesRequestExporter (context .Background (), set , requestFromProfilesFunc (nil ), sendertest .NewNopSenderFunc [exporterhelper.Request ]())
213
+ le , err := NewProfilesRequest (context .Background (), set , requestFromProfilesFunc (nil ), sendertest .NewNopSenderFunc [exporterhelper.Request ]())
214
214
require .NoError (t , err )
215
215
require .NotNil (t , le )
216
216
checkWrapSpanForProfilesExporter (t , sr , set .TracerProvider .Tracer ("test" ), le , nil )
@@ -238,7 +238,7 @@ func TestProfilesRequestExporter_WithSpan_ReturnError(t *testing.T) {
238
238
defer otel .SetTracerProvider (nooptrace .NewTracerProvider ())
239
239
240
240
want := errors .New ("my_error" )
241
- le , err := NewProfilesRequestExporter (context .Background (), set , requestFromProfilesFunc (nil ), sendertest.NewErrSenderFunc [exporterhelper.Request ](want ))
241
+ le , err := NewProfilesRequest (context .Background (), set , requestFromProfilesFunc (nil ), sendertest.NewErrSenderFunc [exporterhelper.Request ](want ))
242
242
require .NoError (t , err )
243
243
require .NotNil (t , le )
244
244
checkWrapSpanForProfilesExporter (t , sr , set .TracerProvider .Tracer ("test" ), le , want )
@@ -260,7 +260,7 @@ func TestProfilesRequestExporter_WithShutdown(t *testing.T) {
260
260
shutdownCalled := false
261
261
shutdown := func (context.Context ) error { shutdownCalled = true ; return nil }
262
262
263
- le , err := NewProfilesRequestExporter (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
263
+ le , err := NewProfilesRequest (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
264
264
requestFromProfilesFunc (nil ), sendertest .NewNopSenderFunc [exporterhelper.Request ](), exporterhelper .WithShutdown (shutdown ))
265
265
assert .NotNil (t , le )
266
266
require .NoError (t , err )
@@ -284,7 +284,7 @@ func TestProfilesRequestExporter_WithShutdown_ReturnError(t *testing.T) {
284
284
want := errors .New ("my_error" )
285
285
shutdownErr := func (context.Context ) error { return want }
286
286
287
- le , err := NewProfilesRequestExporter (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
287
+ le , err := NewProfilesRequest (context .Background (), exportertest .NewNopSettings (exportertest .NopType ),
288
288
requestFromProfilesFunc (nil ), sendertest .NewNopSenderFunc [exporterhelper.Request ](), exporterhelper .WithShutdown (shutdownErr ))
289
289
assert .NotNil (t , le )
290
290
require .NoError (t , err )
0 commit comments