Commit 4af5c64
fix: stabilize flaky interpreter selection integration tests
Fix two flaky tests in interpreterSelection.integration.test.ts that
fail consistently on CI (all Python versions: 3.10, 3.12, 3.14):
1. 'Change event includes old and new values': setEnvironment fires
events via setImmediate(), so the handler created immediately after
the first setEnvironment call caught the stale event instead of the
intended one. Added settle time and now searches for the specific
matching event instead of using handler.last.
2. 'Setting same environment is idempotent': The underlying manager's
onDidChangeEnvironment can trigger refreshEnvironment(), firing
events even on same-value sets. Changed assertion to verify that
if events fire, they don't indicate an actual change (old === new),
rather than asserting no events fire at all.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 566c343 commit 4af5c64
1 file changed
Lines changed: 30 additions & 8 deletions
Lines changed: 30 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
231 | 238 | | |
232 | | - | |
| 239 | + | |
233 | 240 | | |
234 | 241 | | |
235 | 242 | | |
| |||
345 | 352 | | |
346 | 353 | | |
347 | 354 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
353 | 375 | | |
354 | 376 | | |
355 | 377 | | |
| |||
0 commit comments