Skip to content

Commit 7c16951

Browse files
authored
test(instrumentation-aws-sdk): update client in bedrock-runtime tests to use NodeHttpHandler instead of the new default NodeHttp2Handler (#2810)
1 parent b3a70d7 commit 7c16951

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import {
4343
import { AwsCredentialIdentity } from '@aws-sdk/types';
4444
import * as path from 'path';
4545
import { Definition, back as nockBack } from 'nock';
46+
import { NodeHttpHandler } from '@smithy/node-http-handler';
4647

4748
import { ReadableSpan } from '@opentelemetry/sdk-trace-base';
4849
import {
@@ -88,7 +89,12 @@ describe('Bedrock', () => {
8889
};
8990
}
9091

91-
const client = new BedrockRuntimeClient({ region, credentials });
92+
// Use NodeHttpHandler to use HTTP instead of HTTP2 because nock does not support HTTP2
93+
const client = new BedrockRuntimeClient({
94+
region,
95+
credentials,
96+
requestHandler: new NodeHttpHandler(),
97+
});
9298

9399
let nockDone: () => void;
94100
beforeEach(async function () {

0 commit comments

Comments
 (0)