Skip to content

Commit b9e3f32

Browse files
authored
Relax grpc errors to allow for upgrade (#6685)
#6679 is changing the gRPC errors, which fails our tests. This change allows those tests to pass so the upgrade can happen.
1 parent 5e4ff97 commit b9e3f32

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

exporters/otlp/otlplog/otlploggrpc/internal/retry/retry_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
200200
ctx := context.Background()
201201
assert.Contains(t, reqFunc(ctx, func(context.Context) error {
202202
return assert.AnError
203-
}).Error(), "max retry time elapsed: ")
203+
}).Error(), "max retry time")
204204
}
205205

206206
func TestRetryNotEnabled(t *testing.T) {

exporters/otlp/otlplog/otlploghttp/internal/retry/retry_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
200200
ctx := context.Background()
201201
assert.Contains(t, reqFunc(ctx, func(context.Context) error {
202202
return assert.AnError
203-
}).Error(), "max retry time elapsed: ")
203+
}).Error(), "max retry time")
204204
}
205205

206206
func TestRetryNotEnabled(t *testing.T) {

exporters/otlp/otlpmetric/otlpmetricgrpc/client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func TestConfig(t *testing.T) {
236236
ctx := context.Background()
237237
t.Cleanup(func() { require.NoError(t, exp.Shutdown(ctx)) })
238238
err := exp.Export(ctx, &metricdata.ResourceMetrics{})
239-
assert.ErrorContains(t, err, context.DeadlineExceeded.Error())
239+
assert.ErrorContains(t, err, "DeadlineExceeded")
240240
})
241241

242242
t.Run("WithCustomUserAgent", func(t *testing.T) {

exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry/retry_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
200200
ctx := context.Background()
201201
assert.Contains(t, reqFunc(ctx, func(context.Context) error {
202202
return assert.AnError
203-
}).Error(), "max retry time elapsed: ")
203+
}).Error(), "max retry time")
204204
}
205205

206206
func TestRetryNotEnabled(t *testing.T) {

exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry/retry_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
200200
ctx := context.Background()
201201
assert.Contains(t, reqFunc(ctx, func(context.Context) error {
202202
return assert.AnError
203-
}).Error(), "max retry time elapsed: ")
203+
}).Error(), "max retry time")
204204
}
205205

206206
func TestRetryNotEnabled(t *testing.T) {

exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
200200
ctx := context.Background()
201201
assert.Contains(t, reqFunc(ctx, func(context.Context) error {
202202
return assert.AnError
203-
}).Error(), "max retry time elapsed: ")
203+
}).Error(), "max retry time")
204204
}
205205

206206
func TestRetryNotEnabled(t *testing.T) {

exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
200200
ctx := context.Background()
201201
assert.Contains(t, reqFunc(ctx, func(context.Context) error {
202202
return assert.AnError
203-
}).Error(), "max retry time elapsed: ")
203+
}).Error(), "max retry time")
204204
}
205205

206206
func TestRetryNotEnabled(t *testing.T) {

internal/shared/otlp/retry/retry_test.go.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
200200
ctx := context.Background()
201201
assert.Contains(t, reqFunc(ctx, func(context.Context) error {
202202
return assert.AnError
203-
}).Error(), "max retry time elapsed: ")
203+
}).Error(), "max retry time")
204204
}
205205

206206
func TestRetryNotEnabled(t *testing.T) {

0 commit comments

Comments
 (0)