Skip to content

Commit

Permalink
[otelarrowexporter] Deflake TestSendArrowTracesNotSupported (#200)
Browse files Browse the repository at this point in the history
There is a test flake, seen here. I believe this is for failing to
shutdown the service, which causes a 100s long run-time. This does not
explain a deadlock, but we aren't sure that has happened, vs a timeout
due to CPU shortage.


https://github.com/open-telemetry/otel-arrow/actions/runs/9180018006/job/25243494523
  • Loading branch information
jmacd authored May 22, 2024
1 parent 9456c27 commit f1d366e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions collector/exporter/otelarrowexporter/otelarrow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -935,10 +935,6 @@ func testSendArrowTraces(t *testing.T, clientWaitForReady, streamServiceAvailabl
require.NoError(t, err)
require.NotNil(t, exp)

defer func() {
assert.NoError(t, exp.Shutdown(context.Background()))
}()

type isUserCall struct{}

host := newHostWithExtensions(
Expand All @@ -956,6 +952,15 @@ func testSendArrowTraces(t *testing.T, clientWaitForReady, streamServiceAvailabl
assert.NoError(t, exp.Start(context.Background(), host))

rcv, _ := otelArrowTracesReceiverOnGRPCServer(ln, false)

defer func() {
// Shutdown before GracefulStop, because otherwise we
// wait for a full stream lifetime instead of closing
// after requests are served.
assert.NoError(t, exp.Shutdown(context.Background()))
rcv.srv.GracefulStop()
}()

if streamServiceAvailable {
rcv.startStreamMockArrowTraces(t, okStatusFor)
}
Expand Down Expand Up @@ -988,8 +993,6 @@ func testSendArrowTraces(t *testing.T, clientWaitForReady, streamServiceAvailabl
md := rcv.getMetadata()
require.EqualValues(t, []string{"arrow"}, md.Get("callerid"))
require.EqualValues(t, expectedHeader, md.Get("header"))

rcv.srv.GracefulStop()
}

func okStatusFor(id int64) *arrowpb.BatchStatus {
Expand Down

0 comments on commit f1d366e

Please sign in to comment.