Skip to content

Commit

Permalink
fix unittest
Browse files Browse the repository at this point in the history
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
  • Loading branch information
fatsheep9146 committed Jun 26, 2022
1 parent 160310a commit aec2071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exporter/exporterhelper/queued_retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,11 @@ func TestQueuedRetry_QueueMetricsReported(t *testing.T) {
be := newBaseExporter(&defaultExporterCfg, componenttest.NewNopExporterCreateSettings(), fromOptions(WithRetry(rCfg), WithQueue(qCfg)), "", nopRequestUnmarshaler())
require.NoError(t, be.Start(context.Background(), componenttest.NewNopHost()))

checkValueForGlobalManager(t, defaultExporterTags, int64(5000), "exporter/queue_capacity")
for i := 0; i < 7; i++ {
require.NoError(t, be.sender.send(newErrorRequest(context.Background())))
}
checkValueForGlobalManager(t, defaultExporterTags, int64(7), "exporter/queue_size")
checkValueForGlobalManager(t, defaultExporterTags, int64(5000), "exporter/queue_capacity")

assert.NoError(t, be.Shutdown(context.Background()))
checkValueForGlobalManager(t, defaultExporterTags, int64(0), "exporter/queue_size")
Expand Down

0 comments on commit aec2071

Please sign in to comment.