Skip to content

Commit 1260272

Browse files
committed
lengthen timeout for flakiness
1 parent f3e927d commit 1260272

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
},
2727
"prettier.tabWidth": 4,
2828
"python-envs.defaultEnvManager": "ms-python.python:venv",
29-
"python-envs.pythonProjects": [],
3029
"git.branchRandomName.enable": true,
3130
"git.branchProtection": ["main"],
3231
"git.branchProtectionPrompt": "alwaysCommitToNewBranch",

src/test/integration/interpreterSelection.integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ suite('Integration: Interpreter Selection Priority', function () {
171171
// Change to new environment
172172
await api.setEnvironment(undefined, newEnv);
173173

174-
// Wait for event
175-
await handler.assertFired(5000);
174+
// Wait for event - use 15s timeout for CI stability
175+
await handler.assertFired(15_000);
176176

177177
const event = handler.last;
178178
assert.ok(event, 'Event should have fired');

src/test/integration/pythonProjects.integration.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,13 @@ suite('Integration: Python Projects', function () {
175175

176176
// Wait for the environment to be retrievable with the correct ID
177177
// This handles async persistence across platforms
178+
// Use 15s timeout - CI runners (especially macos) can be slow with settings persistence
178179
await waitForCondition(
179180
async () => {
180181
const retrieved = await api.getEnvironment(project.uri);
181182
return retrieved !== undefined && retrieved.envId.id === env.envId.id;
182183
},
183-
5000,
184+
15_000,
184185
`Environment was not set correctly. Expected envId: ${env.envId.id}`,
185186
);
186187

@@ -224,9 +225,10 @@ suite('Integration: Python Projects', function () {
224225
await api.setEnvironment(project.uri, targetEnv);
225226

226227
// Wait for an event where event.new is defined (the actual change event)
228+
// Use 15s timeout - CI runners can be slow
227229
await waitForCondition(
228230
() => handler.all.some((e) => e.new !== undefined),
229-
5000,
231+
15_000,
230232
'onDidChangeEnvironment with new environment was not fired',
231233
);
232234

@@ -261,12 +263,13 @@ suite('Integration: Python Projects', function () {
261263
await api.setEnvironment(project.uri, env);
262264

263265
// Wait for it to be set
266+
// Use 15s timeout - CI runners can be slow with settings persistence
264267
await waitForCondition(
265268
async () => {
266269
const retrieved = await api.getEnvironment(project.uri);
267270
return retrieved !== undefined && retrieved.envId.id === env.envId.id;
268271
},
269-
5000,
272+
15_000,
270273
'Environment was not set before clearing',
271274
);
272275

@@ -319,12 +322,13 @@ suite('Integration: Python Projects', function () {
319322
await api.setEnvironment(project.uri, env);
320323

321324
// Wait for it to be set
325+
// Use 15s timeout - CI runners can be slow with settings persistence
322326
await waitForCondition(
323327
async () => {
324328
const retrieved = await api.getEnvironment(project.uri);
325329
return retrieved !== undefined && retrieved.envId.id === env.envId.id;
326330
},
327-
5000,
331+
15_000,
328332
'Environment was not set for project',
329333
);
330334

0 commit comments

Comments
 (0)