diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts index 49bdc4d242..f66118a918 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts @@ -43,6 +43,7 @@ import { import { AwsCredentialIdentity } from '@aws-sdk/types'; import * as path from 'path'; import { Definition, back as nockBack } from 'nock'; +import { NodeHttpHandler } from '@smithy/node-http-handler'; import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { @@ -88,7 +89,12 @@ describe('Bedrock', () => { }; } - const client = new BedrockRuntimeClient({ region, credentials }); + // Use NodeHttpHandler to use HTTP instead of HTTP2 because nock does not support HTTP2 + const client = new BedrockRuntimeClient({ + region, + credentials, + requestHandler: new NodeHttpHandler(), + }); let nockDone: () => void; beforeEach(async function () {