Skip to content

Commit

Permalink
final modification
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Awawdi <[email protected]>
  • Loading branch information
Muhammad-awawdi-amazon committed Dec 23, 2024
1 parent 968a9c0 commit 8d4b973
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions node/tests/GlideClusterClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2105,10 +2105,6 @@ describe("GlideClusterClient", () => {
);
}).length;

console.log(
`Attempt ${attempt}: Matching entries count = ${matchingEntriesCount}, Expected = ${nReplicas}`,
);

if (matchingEntriesCount === nReplicas) {
return matchingEntriesCount; // Success
}
Expand Down Expand Up @@ -2159,8 +2155,6 @@ describe("GlideClusterClient", () => {
{ route: "allNodes" },
);

// await new Promise((resolve) => setTimeout(resolve, 2000));

// Retrieve the number of replicas dynamically
const n_replicas = await getNumberOfReplicas(
client_for_config_set,
Expand Down Expand Up @@ -2193,8 +2187,6 @@ describe("GlideClusterClient", () => {
{ route: "allNodes" },
);

// await new Promise((resolve) => setTimeout(resolve, 2000));

if (Array.isArray(azs)) {
const allAZsMatch = azs.every((node) => {
const nodeResponse = node as {
Expand Down Expand Up @@ -2232,8 +2224,6 @@ describe("GlideClusterClient", () => {
await client_for_testing_az.get("foo");
}

// await new Promise((resolve) => setTimeout(resolve, 2000));

// Stage 4: Verify GET commands were routed correctly
const matchingEntriesCount = await retryUntilInfoIsCorrect(
client_for_testing_az,
Expand Down Expand Up @@ -2287,10 +2277,6 @@ describe("GlideClusterClient", () => {
return infoStr.includes(`availability_zone:${az}`);
}).length;

console.log(
`Attempt ${attempt}: matchingEntriesCount = ${matchingEntriesCount}, changedAzCount = ${changedAzCount}`,
);

if (matchingEntriesCount === 1 && changedAzCount === 1) {
return { matchingEntriesCount, changedAzCount }; // Success
}
Expand Down Expand Up @@ -2342,15 +2328,11 @@ describe("GlideClusterClient", () => {
"RESETSTAT",
]);

await new Promise((resolve) => setTimeout(resolve, 2000));

await client_for_config_set.customCommand(
["CONFIG", "SET", "availability-zone", az],
{ route: { type: "replicaSlotId", id: 12182 } },
);

await new Promise((resolve) => setTimeout(resolve, 2000));

// Stage 2: Create AZ affinity client and verify configuration
client_for_testing_az =
await GlideClusterClient.createClient(
Expand All @@ -2369,8 +2351,6 @@ describe("GlideClusterClient", () => {
await client_for_testing_az.get("foo");
}

await new Promise((resolve) => setTimeout(resolve, 2000));

// Stage 4: Verify GET commands were routed correctly
const { matchingEntriesCount, changedAzCount } =
await retryUntilCorrectInfoForAz(
Expand Down Expand Up @@ -2432,15 +2412,11 @@ describe("GlideClusterClient", () => {
{ route: "allNodes" },
);

await new Promise((resolve) => setTimeout(resolve, 2000));

// Issue GET commands
for (let i = 0; i < GET_CALLS; i++) {
await client_for_testing_az.get("foo");
}

await new Promise((resolve) => setTimeout(resolve, 2000));

// Fetch command stats from all nodes
const info_result =
await client_for_testing_az.customCommand(
Expand Down

0 comments on commit 8d4b973

Please sign in to comment.