Skip to content

Commit

Permalink
(internal/otelarrow) Fix an e2e test flake
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacd committed Nov 1, 2024
1 parent 0dcdebf commit b5b6caa
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion internal/otelarrow/test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down

0 comments on commit b5b6caa

Please sign in to comment.