Skip to content

Commit c8f9563

Browse files
authored
MemoryLimiterProcessor - switch to MustNewID instead of zero value ID (#10128)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description In an upcoming PR, I change Type to be an interface. This means the zero value of Type will be nil - which will cause this test to fail. Initializing ID instead of relying on the zero value fixes this <!-- Issue number if applicable --> #### Link to tracking issue related to #9429 <!--Please delete paragraphs that you did not use before submitting.--> In preparation for #10069
1 parent bfe3b31 commit c8f9563

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

processor/memorylimiterprocessor/memorylimiter_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ func TestNoDataLoss(t *testing.T) {
5656
limiter, err := newMemoryLimiterProcessor(set, cfg)
5757
require.NoError(t, err)
5858

59-
processor, err := processorhelper.NewLogsProcessor(context.Background(), processor.CreateSettings{}, cfg, exporter,
59+
processor, err := processorhelper.NewLogsProcessor(context.Background(), processor.CreateSettings{
60+
ID: component.MustNewID("nop"),
61+
}, cfg, exporter,
6062
limiter.processLogs,
6163
processorhelper.WithStart(limiter.start),
6264
processorhelper.WithShutdown(limiter.shutdown))

0 commit comments

Comments
 (0)