Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Flaky test: concurrent CLI redownload times out waiting for the progress log to go away

Chiusa
#1,120 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@EhabY ci sta già lavorando.

Dal 18/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

tech-debt

test/unit/core/cliManager.concurrent.test.ts fails intermittently on CI. It passed on attempt 1 of run 35406584668 and failed on attempt 2 of the same commit, in Unit Test (Linux, Electron 37).

FAIL test/unit/core/cliManager.concurrent.test.ts > CliManager Concurrent Downloads > redownloads when version mismatch is detected concurrently
AssertionError: promise resolved "undefined" instead of rejecting
- Expected: Error { "message": "rejected promise" }
+ Received: undefined
 ❯ test/unit/core/cliManager.concurrent.test.ts:102:56

Line 102 is the progress-log half of expectLockFilesRemoved:

await vi.waitFor(async () => {
  await expect(fs.access(binaryPath + ".lock")).rejects.toThrow();
  await expect(fs.access(binaryPath + ".progress.log")).rejects.toThrow();
});

fs.access resolved, so <binary>.progress.log was still on disk when the poll gave up. The test starts three fetchBinary calls, two of which detect the version mismatch and redownload, and Promise.all resolves before every peer has finished releasing its progress log. vi.waitFor defaults to a 1s timeout at a 50ms interval, which a loaded runner can outlast.

#1043 added that polling for this same flake, so the window helps but is not always enough.

Worth considering:

  • Give vi.waitFor an explicit timeout, which is the cheap fix but still time-based.
  • Make the cleanup observable and await it, rather than polling the filesystem.
  • Decide whether the progress log belongs in the assertion at all after a concurrent redownload, since the lock is the part the contract depends on.
Lingua principale
TypeScript
Stelle
131
Fork
48
Merge medio
1g 23h
PR unite (30g)
16

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/vscode-coder

Tutte le issue di coder/vscode-coder

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.