Skip to content

Commit 35ad5ea

Browse files
committed
feat: least connections host selector strategy
1 parent de97773 commit 35ad5ea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: jest.integration.config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"moduleFileExtensions": ["ts", "js", "json"],
3-
"testMatch": ["<rootDir>/tests/integration/container/tests/*.(spec|test).ts|tsx"],
3+
"testMatch": ["<rootDir>/tests/integration/container/tests/fastest_response_strategy*.(spec|test).ts|tsx"],
44
"transform": {
55
"^.+\\.ts$": [
66
"ts-jest",

Diff for: tests/integration/container/tests/fastest_response_strategy.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ describe("aurora fastest response strategy", () => {
173173
);
174174

175175
itIf(
176-
"test set read only reuse cached connection",
176+
"test secondary client use fastest connection",
177177
async () => {
178178
const config = await initDefaultConfig(env.databaseInfo.writerInstanceEndpoint, env.databaseInfo.instanceEndpointPort, false);
179179

@@ -187,8 +187,8 @@ describe("aurora fastest response strategy", () => {
187187
await secondaryClient.connect();
188188

189189
// connect using cached fastest connection
190-
await client.setReadOnly(true);
191-
const currentReaderId1 = await auroraTestUtility.queryInstanceId(client);
190+
await secondaryClient.setReadOnly(true);
191+
const currentReaderId1 = await auroraTestUtility.queryInstanceId(secondaryClient);
192192

193193
expect(currentReaderId1).toStrictEqual(currentReaderId0);
194194
expect(client).not.toBe(secondaryClient);

0 commit comments

Comments
 (0)