Integration tests fail locally when desktop Kusto Explorer data is present (import prompt blocks activation)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript, vscode
- Lĩnh vực
- developer-experience, testing-qa
Hướng nghiên cứu
Bắt đầu trong src/Client/.vscode-test.mjs và kiểm tra launchArgs của integration-test cũng như phần thiết lập test profile. Chạy npm run test:integration với một profile src/Client/.vscode-test/user-data mới và có sẵn dữ liệu Kusto Explorer trên desktop; hoàn tất khi bộ test không còn hiển thị lỗi import prompt và test ScratchPad1 vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 6
- Fork
- 7
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/Kusto-Explorer-VsCode
-
Remote-SSH: browser sign-in on every query; prefer VS Code authentication before native authĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
-
Schema cache stores ~950KB in globalState, triggering VS Code's large-extension-state warningĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
-
Results grid: show Count/Sum/Avg/Min/Max for selected numeric cells in a status barCó thể đã có người làm @AsafMah đã nhận 53 ngày trước. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
microsoft/Kusto-Explorer-VsCode#143 · 1 bình luận ·
-
Add a setting to scope the query CodeLens to the active queryCó thể đã có người làm @AsafMah đã nhận 52 ngày trước. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
-
Log Analytics / Application Insights connections truncate the full proxy URI to the bare hostnameCó thể đã có người làm @AsafMah đã nhận 52 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
microsoft/Kusto-Explorer-VsCode#139 · 1 bình luận · 1 reaction ·
Tất cả issue của microsoft/Kusto-Explorer-VsCode
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kunchenguid/gh-axi#220 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
prerender: wait for env-runner worker readiness before crawlingCó thể đã có người làm @sarankumar1325 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày