Skip to content

Commit

Permalink
defer shutdown assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll committed May 11, 2024
1 parent 08397a8 commit 2bf6a4a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions receiver/podmanreceiver/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,13 @@ func TestScraperLoop(t *testing.T) {
}()

assert.NoError(t, r.start(ctx, componenttest.NewNopHost()))
defer assert.NoError(t, r.shutdown(ctx))

md, err := r.scrape(ctx)
assert.NoError(t, err)
assert.Equal(t, 1, md.ResourceMetrics().Len())

assertStatsEqualToMetrics(t, genContainerStats(), md)

assert.NoError(t, r.shutdown(ctx))
}

type mockClient chan containerStatsReport
Expand Down

0 comments on commit 2bf6a4a

Please sign in to comment.