From e7b86bbac669cfc2db0e77dbd47d65ab643f237a Mon Sep 17 00:00:00 2001 From: Cesar Munoz <56847527+LikeTheSalad@users.noreply.github.com> Date: Wed, 18 Oct 2023 11:49:32 +0200 Subject: [PATCH] Updating logs tests ConsumeLogs calls --- input/otlp/logs_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/input/otlp/logs_test.go b/input/otlp/logs_test.go index 0b28af6e..20f16d4b 100644 --- a/input/otlp/logs_test.go +++ b/input/otlp/logs_test.go @@ -487,7 +487,9 @@ func TestConsumerConsumeOTelLogsWithTimestamp(t *testing.T) { Processor: processor, Semaphore: semaphore.NewWeighted(100), }) - assert.NoError(t, consumer.ConsumeLogs(context.Background(), logs)) + result, err := consumer.ConsumeLogs(context.Background(), logs) + assert.NoError(t, err) + assert.Equal(t, otlp.ConsumeLogsResult{}, result) assert.Len(t, processed, 1) assert.Equal(t, int(timestamp.AsTime().UnixNano()), int(processed[0].Timestamp)) @@ -518,7 +520,9 @@ func TestConsumerConsumeOTelLogsWithoutTimestamp(t *testing.T) { Processor: processor, Semaphore: semaphore.NewWeighted(100), }) - assert.NoError(t, consumer.ConsumeLogs(context.Background(), logs)) + result, err := consumer.ConsumeLogs(context.Background(), logs) + assert.NoError(t, err) + assert.Equal(t, otlp.ConsumeLogsResult{}, result) assert.Len(t, processed, 1) assert.Equal(t, int(timestamp.AsTime().UnixNano()), int(processed[0].Timestamp)) @@ -550,7 +554,9 @@ func TestConsumerConsumeOTelLogsWithObservedTimestampWithoutTimestamp(t *testing Processor: processor, Semaphore: semaphore.NewWeighted(100), }) - assert.NoError(t, consumer.ConsumeLogs(context.Background(), logs)) + result, err := consumer.ConsumeLogs(context.Background(), logs) + assert.NoError(t, err) + assert.Equal(t, otlp.ConsumeLogsResult{}, result) assert.Len(t, processed, 1) assert.Equal(t, int(observedTimestamp.AsTime().UnixNano()), int(processed[0].Timestamp))