Skip to content

Commit 8eeb786

Browse files
committed
fix: tests
1 parent d2f91d5 commit 8eeb786

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/integration/tools/atlas/clusters.test.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,23 @@ describeWithAtlas("clusters", (integration) => {
178178
})) as CallToolResult;
179179
expect(response.content).toBeArray();
180180
expect(response.content).toHaveLength(1);
181-
expect(response.content[0]?.text).toContain(`Connected to cluster "${clusterName}"`);
181+
expect(response.content[0]?.type).toEqual("text");
182+
expect(response.content[0]?.text).toContain(`Connecting to cluster "${clusterName}"...`);
183+
184+
for (let i = 0; i < 600; i++) {
185+
const response = (await integration.mcpClient().callTool({
186+
name: "atlas-connect-cluster",
187+
arguments: { projectId, clusterName },
188+
})) as CallToolResult;
189+
expect(response.content).toBeArray();
190+
expect(response.content).toHaveLength(1);
191+
expect(response.content[0]?.type).toEqual("text");
192+
const c = response.content[0] as { text: string };
193+
if (c.text.includes("Cluster is already connected.")) {
194+
break; // success
195+
}
196+
await sleep(500);
197+
}
182198
});
183199
});
184200
});

0 commit comments

Comments
 (0)