From b747f84391a0de3cf10eeb0b96ffd474d1b53400 Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Fri, 3 Jun 2022 18:19:04 -0400 Subject: [PATCH] test both messages --- .../opentelemetry-instrumentation-aws-sdk/test/sqs.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sqs.test.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sqs.test.ts index a5ef8370f1..9563af1de9 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sqs.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/sqs.test.ts @@ -372,7 +372,12 @@ describe('SQS', () => { }); it('should have the custom added message attributes', async () => { - expect(receivedMessages[0].MessageAttributes?.TestMessageAttribute?.StringValue).toEqual('test value'); + receivedMessages. + forEach(msg => { + expect(msg.MessageAttributes?.TestMessageAttribute?.StringValue).toEqual( + 'test value' + ); + }) }); });