1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-08-10 22:31:50 +02:00

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.
This commit is contained in:
Damien Mathieu
2025-04-23 09:53:02 +02:00
committed by GitHub
parent 5e4ff9730b
commit b9e3f32a83
8 changed files with 8 additions and 8 deletions

View File

@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
ctx := context.Background() ctx := context.Background()
assert.Contains(t, reqFunc(ctx, func(context.Context) error { assert.Contains(t, reqFunc(ctx, func(context.Context) error {
return assert.AnError return assert.AnError
}).Error(), "max retry time elapsed: ") }).Error(), "max retry time")
} }
func TestRetryNotEnabled(t *testing.T) { func TestRetryNotEnabled(t *testing.T) {

View File

@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
ctx := context.Background() ctx := context.Background()
assert.Contains(t, reqFunc(ctx, func(context.Context) error { assert.Contains(t, reqFunc(ctx, func(context.Context) error {
return assert.AnError return assert.AnError
}).Error(), "max retry time elapsed: ") }).Error(), "max retry time")
} }
func TestRetryNotEnabled(t *testing.T) { func TestRetryNotEnabled(t *testing.T) {

View File

@@ -236,7 +236,7 @@ func TestConfig(t *testing.T) {
ctx := context.Background() ctx := context.Background()
t.Cleanup(func() { require.NoError(t, exp.Shutdown(ctx)) }) t.Cleanup(func() { require.NoError(t, exp.Shutdown(ctx)) })
err := exp.Export(ctx, &metricdata.ResourceMetrics{}) err := exp.Export(ctx, &metricdata.ResourceMetrics{})
assert.ErrorContains(t, err, context.DeadlineExceeded.Error()) assert.ErrorContains(t, err, "DeadlineExceeded")
}) })
t.Run("WithCustomUserAgent", func(t *testing.T) { t.Run("WithCustomUserAgent", func(t *testing.T) {

View File

@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
ctx := context.Background() ctx := context.Background()
assert.Contains(t, reqFunc(ctx, func(context.Context) error { assert.Contains(t, reqFunc(ctx, func(context.Context) error {
return assert.AnError return assert.AnError
}).Error(), "max retry time elapsed: ") }).Error(), "max retry time")
} }
func TestRetryNotEnabled(t *testing.T) { func TestRetryNotEnabled(t *testing.T) {

View File

@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
ctx := context.Background() ctx := context.Background()
assert.Contains(t, reqFunc(ctx, func(context.Context) error { assert.Contains(t, reqFunc(ctx, func(context.Context) error {
return assert.AnError return assert.AnError
}).Error(), "max retry time elapsed: ") }).Error(), "max retry time")
} }
func TestRetryNotEnabled(t *testing.T) { func TestRetryNotEnabled(t *testing.T) {

View File

@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
ctx := context.Background() ctx := context.Background()
assert.Contains(t, reqFunc(ctx, func(context.Context) error { assert.Contains(t, reqFunc(ctx, func(context.Context) error {
return assert.AnError return assert.AnError
}).Error(), "max retry time elapsed: ") }).Error(), "max retry time")
} }
func TestRetryNotEnabled(t *testing.T) { func TestRetryNotEnabled(t *testing.T) {

View File

@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
ctx := context.Background() ctx := context.Background()
assert.Contains(t, reqFunc(ctx, func(context.Context) error { assert.Contains(t, reqFunc(ctx, func(context.Context) error {
return assert.AnError return assert.AnError
}).Error(), "max retry time elapsed: ") }).Error(), "max retry time")
} }
func TestRetryNotEnabled(t *testing.T) { func TestRetryNotEnabled(t *testing.T) {

View File

@@ -200,7 +200,7 @@ func TestMaxElapsedTime(t *testing.T) {
ctx := context.Background() ctx := context.Background()
assert.Contains(t, reqFunc(ctx, func(context.Context) error { assert.Contains(t, reqFunc(ctx, func(context.Context) error {
return assert.AnError return assert.AnError
}).Error(), "max retry time elapsed: ") }).Error(), "max retry time")
} }
func TestRetryNotEnabled(t *testing.T) { func TestRetryNotEnabled(t *testing.T) {