Skip to content

Commit

Permalink
Use t.Cleanup to make sure shutdown is called.
Browse files Browse the repository at this point in the history
  • Loading branch information
crobert-1 committed Jan 4, 2024
1 parent cb5d261 commit 16246d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exporter/exporterhelper/queue_sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,10 @@ func TestQueuedRetryPersistentEnabled_NoDataLossOnShutdown(t *testing.T) {
newNoopObsrepSender, WithRetry(rCfg), WithQueue(qCfg))
require.NoError(t, err)
require.NoError(t, be.Start(context.Background(), host))
t.Cleanup(func() { require.NoError(t, be.Shutdown(context.Background())) })

// wait for the item to be consumed from the queue
replacedReq.checkNumRequests(t, 1)
require.NoError(t, be.Shutdown(context.Background()))
}

func TestQueueSenderNoStartShutdown(t *testing.T) {
Expand Down

0 comments on commit 16246d7

Please sign in to comment.