From b5b6caa08cd09c2d135a69ce03c564934ce689bd Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Fri, 1 Nov 2024 11:15:57 -0700 Subject: [PATCH] (internal/otelarrow) Fix an e2e test flake --- internal/otelarrow/test/e2e_test.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/internal/otelarrow/test/e2e_test.go b/internal/otelarrow/test/e2e_test.go index 3b2e8e288a73..b0acd02f4e12 100644 --- a/internal/otelarrow/test/e2e_test.go +++ b/internal/otelarrow/test/e2e_test.go @@ -324,12 +324,20 @@ func standardEnding(t *testing.T, params testParams, testCon *testConsumer, expe for _, span := range testCon.expSpans.GetSpans() { eops[fmt.Sprintf("%v/%v", span.Name, span.Status.Code)]++ - // This span has a recognized span error which we can't easily fix. See + // This span has a recognized span error which we + // can't easily fix related to the way Canceled status + // are treated by otel-grpc instrumentation. See // https://github.com/open-telemetry/opentelemetry-go-contrib/issues/2644 if span.Name == "opentelemetry.proto.experimental.arrow.v1.ArrowTracesService/ArrowTraces" { continue } + // Note we also expect to see EOF errors. The + // requests that see EOF are retried. + if span.Status.Code == otelcodes.Error && + span.Name == "otel_arrow_stream_send" && span.Status.Description == "EOF" { + continue + } require.NotEqual(t, otelcodes.Error, span.Status.Code, "Exporter span has error: %v: %v", span.Name, span.Status.Description) } @@ -340,6 +348,14 @@ func standardEnding(t *testing.T, params testParams, testCon *testConsumer, expe continue } + // For the admission control Note we also expect to see EOF errors. The + // requests that see EOF are retried. + if span.Status.Code == otelcodes.Error && + span.Name == "otel_arrow_stream_inflight" && + span.Status.Description == "rejecting request, too much pending data" { + continue + } + require.NotEqual(t, otelcodes.Error, span.Status.Code, "Receiver span has error: %v: %v", span.Name, span.Status.Description) }