Integration tests fail locally when desktop Kusto Explorer data is present (import prompt blocks activation)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript, vscode
- Ambito
- developer-experience, testing-qa
Direzione di ricerca
Inizia in src/Client/.vscode-test.mjs e ispeziona i launchArgs del test di integrazione e la configurazione del profilo di test. Esegui npm run test:integration con un profilo src/Client/.vscode-test/user-data nuovo e con i dati desktop di Kusto Explorer presenti; l’attività è completata quando la suite non mostra più l’errore del prompt di importazione e il test ScratchPad1 passa.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
npm run test:integration fails for a developer who has desktop Kusto Explorer data on their machine:
1) ScratchPad1 document is open by default:
AssertionError [ERR_ASSERTION]: ScratchPad1 should be open after activation
46 passing (21s)
1 failing
The cause appears in the same output:
rejected promise not handled within 1 second: Error: DialogService: refused to show dialog in tests.
Contents: Kusto Explorer connections and query set documents found. Would you like to import them?
The extension prompts to import connections from desktop Kusto Explorer during activation. The test DialogService refuses modal dialogs, that rejection goes unhandled, and activation never completes — so ScratchPad1 is never opened and the assertion fails. The failing test is a symptom; the prompt is the cause.
The suite is not hermetic
The failure depends on machine and profile state rather than on the code under test. Evidence gathered by running the same suite in two worktrees on the same machine, both based on the same main:
| worktree | result |
|---|---|
| one branch | 46 passing, exit 0 — no failure |
| another branch | 46 passing / 1 failing, exit 1 — prompt fired |
Neither branch touches activation, connection import, or the scratchpad. The differentiator is the per-worktree .vscode-test/user-data profile: once a profile has recorded that the import prompt was handled, the prompt stops firing and the suite goes green. A fresh profile plus desktop Kusto Explorer data present on the machine reproduces the failure.
This was also independently controlled for by reverting a branch's changed files to its merge-base and re-running: the identical 46/1 failure persisted, confirming it is not caused by the code under test.
CI is unaffected — hosted runners have no desktop Kusto Explorer installation, so the prompt never fires there and Integration Tests (VS Code) passes. That is precisely why this only bites locally, and only for contributors who actually use the desktop product.
Suggested fix
The extension already contributes a setting for exactly this:
msKustoExplorer.connections.suppressKustoExplorerImportPrompt (boolean, default false)
.vscode-test.mjs currently passes only:
launchArgs: [
"--disable-updates",
"--skip-release-notes",
"--user-data-dir", ".vscode-test/user-data",
],
Seeding that setting to true for the test profile — or otherwise stubbing the desktop-import detection during integration runs — would make the suite independent of whether the developer has desktop Kusto Explorer installed.
Separately, the unhandled promise rejection is worth a look on its own: a refused or dismissed dialog blocking activation is a failure mode that could plausibly affect real users who dismiss the prompt in an unexpected way, not just tests.
Reproduction
- Have desktop Kusto Explorer connections/query sets present on the machine.
- Delete
src/Client/.vscode-test/user-dataso the test profile is fresh. npm run test:integrationfromsrc/Client.
- Lingua principale
- TypeScript
- Stelle
- 6
- Fork
- 7
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/Kusto-Explorer-VsCode
-
copilot-instructions.md documents `dotnet test` for server tests, which fails on .NET 10Forse già presa @miachillgood l’ha presa 31 giorni fa. Apertadocumentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
-
Schema cache stores ~950KB in globalState, triggering VS Code's large-extension-state warningApertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
-
Results grid: show Count/Sum/Avg/Min/Max for selected numeric cells in a status barForse già presa @AsafMah l’ha presa 49 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
microsoft/Kusto-Explorer-VsCode#143 · 1 commento ·
-
Add a setting to scope the query CodeLens to the active queryForse già presa @AsafMah l’ha presa 48 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
Tutte le issue di microsoft/Kusto-Explorer-VsCode
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
paperclipai/paperclip#16785 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
code-yeongyu/senpi#3661 ·
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
lingdojo/kana-dojo#32731 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
bug status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
mastra-ai/mastra#27538 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Yeachan-Heo/oh-my-codex#3822 ·
I maintainer di solito rispondono entro 1 giorno