Skip to content

Commit 26ccdfc

Browse files
committed
Address comments
1 parent 8352d18 commit 26ccdfc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

tests/integration/helpers.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ export const defaultDriverOptions: DriverOptions = {
4141
...driverOptions,
4242
};
4343

44+
// Timeout in milliseconds for long running tests: defaults to 20 minutes
45+
export const DEFAULT_LONG_RUNNING_TEST_WAIT_TIMEOUT_MS = 1_200_000;
46+
4447
export function setupIntegrationTest(
4548
getUserConfig: () => UserConfig,
4649
getDriverOptions: () => DriverOptions,

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// The timeouts for the beforeAll/afterAll hooks have been modified to account for longer running tests.
33

44
import type { Session } from "../../../../src/common/session.js";
5-
import { expectDefined, getResponseElements } from "../../helpers.js";
6-
import { describeWithAtlas, withProject, randomId, deleteAndWaitCluster, waitCluster, sleep } from "./atlasHelpers.js";
5+
import { DEFAULT_LONG_RUNNING_TEST_WAIT_TIMEOUT_MS, expectDefined, getResponseElements } from "../../helpers.js";
6+
import { describeWithAtlas, withProject, randomId, deleteAndWaitCluster, waitCluster } from "./atlasHelpers.js";
77
import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from "vitest";
88

99
describeWithAtlas("performanceAdvisor", (integration) => {
@@ -16,7 +16,7 @@ describeWithAtlas("performanceAdvisor", (integration) => {
1616
const session: Session = integration.mcpServer().session;
1717
await deleteAndWaitCluster(session, projectId, clusterName, 1000, 1200);
1818
}
19-
}, 1200000);
19+
}, DEFAULT_LONG_RUNNING_TEST_WAIT_TIMEOUT_MS);
2020

2121
describe("atlas-get-performance-advisor", () => {
2222
beforeAll(async () => {
@@ -65,9 +65,7 @@ describeWithAtlas("performanceAdvisor", (integration) => {
6565
10000,
6666
120
6767
);
68-
69-
await sleep(10000);
70-
}, 1200000);
68+
}, DEFAULT_LONG_RUNNING_TEST_WAIT_TIMEOUT_MS);
7169

7270
afterEach(() => {
7371
vi.clearAllMocks();

0 commit comments

Comments
 (0)